Avoiding postback on upload control when another button is clicked

Discussion in 'ASP .Net' started by SBK, Sep 3, 2007.

  1. SBK

    SBK Guest

    Hi All,

    Got a quick problem, hoping someone can help me out here.

    Using an Upload Control. If a file to upload is specified and another form
    action is committed (i.e. btnBack) then the upload control will still post
    the file but not call the event.

    Anything I can do to prevent this?


    Thanks in advance.
     
    SBK, Sep 3, 2007
    #1
    1. Advertising

  2. SBK

    bruce barker Guest

    as the value can be cleared, in client script disable the upload control
    via the onclick event of the buttons you don't want to post the file.
    the browser will not post disabled fields.

    -- bruce (sqlwork.com)




    SBK wrote:
    > Hi All,
    >
    > Got a quick problem, hoping someone can help me out here.
    >
    > Using an Upload Control. If a file to upload is specified and another form
    > action is committed (i.e. btnBack) then the upload control will still post
    > the file but not call the event.
    >
    > Anything I can do to prevent this?
    >
    >
    > Thanks in advance.
    >
    >
    >
    >
     
    bruce barker, Sep 3, 2007
    #2
    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. Mossman
    Replies:
    0
    Views:
    848
    Mossman
    Dec 12, 2005
  2. albert kao
    Replies:
    1
    Views:
    2,070
    marisa lee
    Apr 10, 2010
  3. bthumber
    Replies:
    4
    Views:
    501
    bthumber
    Jun 25, 2010
  4. Dave Prout

    Adding a second button if the first button is clicked

    Dave Prout, Jun 8, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    228
    John Saunders
    Jun 8, 2004
  5. SBK
    Replies:
    0
    Views:
    178
Loading...

Share This Page