Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

enctype="multipart/form-data" performance?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rob - 28 Oct 2007 11:43 GMT
I've got quite an already complex form to which I need to add a upload photo
facility. I know how to do this but wondered if adding the form tag to
include enctype="multipart/form-data" makes a big performance difference to
the form when a photo isn't been uploaded?

Thanks, Rob.
Peter Bromberg [C# MVP] - 28 Oct 2007 15:42 GMT
I doubt it, if there isn't any multipart data to encode.
-- Peter
Recursion: see Recursion
site:  http://www.eggheadcafe.com
unBlog:  http://petesbloggerama.blogspot.com
BlogMetaFinder:    http://www.blogmetafinder.com

> I've got quite an already complex form to which I need to add a upload photo
> facility. I know how to do this but wondered if adding the form tag to
> include enctype="multipart/form-data" makes a big performance difference to
> the form when a photo isn't been uploaded?
>
> Thanks, Rob.
Anthony Jones - 28 Oct 2007 16:26 GMT
> I've got quite an already complex form to which I need to add a upload photo
> facility. I know how to do this but wondered if adding the form tag to
> include enctype="multipart/form-data" makes a big performance difference to
> the form when a photo isn't been uploaded?

It won't make a great deal of difference.  Certainly by far the biggest cost
will the time it takes to send the extra characters over the wire but
that'll be small change if occasionally the data contains a photo.

If it is a real concern then onsubmit event of the form you could test the
photo field value to see if it contains a file name then set the enctype
(encoding in JScript on IE) to your prefered type.

Signature

Anthony Jones - MVP ASP/ASP.NET

Mark Rae [MVP] - 28 Oct 2007 16:30 GMT
> I've got quite an already complex form to which I need to add a upload
> photo facility. I know how to do this but wondered if adding the form tag
> to include enctype="multipart/form-data" makes a big performance
> difference to the form when a photo isn't been uploaded?

None at all.

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Rob - 30 Oct 2007 22:03 GMT
>> difference to the form when a photo isn't been uploaded?
>
> None at all.

Thanks all, I'll give it a go.

Cheers, Rob.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.