can enctype="Multipart/Form-Data" always be used on a form?

S

Stimp

I have an asp.net page with a form and several <INPUT type=file> input
fields so that I can upload images via the form.

I also have about 30 other standard dropdownlists and text boxes as part
of this page that are submitted to a database when the 'UPLOAD' button
is clicked.

My question is this: does having enctype="multipart/form-data" on the
form affect the standard text input box data in anyway, or can I always
have it there?

If so, how exactly does it affect the data?

If not, then would it, in theory, always be possible to have this
enctype on ALL forms regardless of whether you use <INPUT type=file>
fields or not on a page (i.e. if you only had a dropdownlist on the
page)

Thanks,
Peter
 
K

Karl Seguin [MVP]

There's overhead. I *believe* each form field comes with a lot more data -
it isn't just a key=>value pair anymore (although that's what it looks like
in the end with Request.Form). Each field has extra data such as
content-length, character set and such.

In reality it probably isn't a big deal...when everyone was on a 14.4 modem
and pages were smaller than 10k it was pretty significant...now all that
overhead is likely smaller than your header image :)

Download fiddler (free) from http://fiddlertool.com/fiddler/ and do your own
testing.

Karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top