enctype="multipart/form-data" performance?

Discussion in 'ASP .Net' started by Rob, Oct 28, 2007.

  1. Rob

    Rob Guest

    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.
    Rob, Oct 28, 2007
    #1
    1. Advertising

  2. 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



    "Rob" wrote:

    > 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.
    >
    >
    >
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Oct 28, 2007
    #2
    1. Advertising

  3. "Rob" <rob_nicholson@nospam_unforgettable.com> wrote in message
    news:mJZUi.2273$...
    > 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.


    --
    Anthony Jones - MVP ASP/ASP.NET
    Anthony Jones, Oct 28, 2007
    #3
  4. "Rob" <rob_nicholson@nospam_unforgettable.com> wrote in message
    news:mJZUi.2273$...

    > 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.


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
    Mark Rae [MVP], Oct 28, 2007
    #4
  5. Rob

    Rob Guest

    >> difference to the form when a photo isn't been uploaded?
    >
    > None at all.


    Thanks all, I'll give it a go.

    Cheers, Rob.
    Rob, Oct 30, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    8
    Views:
    142,230
    zeeshanakhter2009
    May 26, 2012
  2. Duncan
    Replies:
    0
    Views:
    1,450
    Duncan
    Feb 24, 2006
  3. Matt
    Replies:
    1
    Views:
    11,164
    David Dorward
    Oct 12, 2004
  4. Stimp
    Replies:
    1
    Views:
    889
    Karl Seguin [MVP]
    Nov 9, 2006
  5. Kevin DeValck
    Replies:
    1
    Views:
    722
    7stud --
    May 17, 2011
Loading...

Share This Page