FileUpload workaround not workin on IE

Last post 12-29-2006 3:03 PM by gjsduarte. 5 replies.

Sort Posts:

  • FileUpload workaround not workin on IE

    09-08-2006, 11:59 AM
    • Loading...
    • asfaya
    • Joined on 04-25-2006, 12:33 PM
    • Posts 7

    Hi there!

    I have a FileUpload control inside an UpdatePanel. I found here the workaround to make it work (I added a linkbutton outside the panel and I register:

    upAttachment.Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(LinkButton1, ""));

    on the Page_Load event

    The workaround is working smooth on Firefox, but on IE, it is firing the event when the "Browse" button is clicked.

    Did anybody had this problem? How did you solve it? Please, any help would be welcomed.

    Many thanks

    Andrés

  • Re: FileUpload workaround not workin on IE

    09-08-2006, 3:43 PM
    • Loading...
    • russelyang
    • Joined on 04-09-2006, 10:54 PM
    • Posts 4
    I remember in Atlas document , it is said FileUpload can not be in UpdatePanel.  file upload operation neend a full page postback, my workaround for this issue is: put a full page you do upload inside a iFrame, and upload the file in the iFrame.
    a developer?!
  • Re: FileUpload workaround not workin on IE

    09-08-2006, 4:28 PM
    Answer
    • Loading...
    • Matt M
    • Joined on 08-25-2006, 5:25 PM
    • Eastern WA, USA
    • Posts 128

    There is a good post on how to force a postback in this thread (last post, specifically): http://forums.asp.net/thread/1301938.aspx

     

    It works in IE as well as Firefox.  However, it does refresh the entire page.  Using an iframe might be a better solution, depending on how important not doing a full page postback is.
     

  • Re: FileUpload workaround not workin on IE

    09-11-2006, 1:19 PM
    • Loading...
    • asfaya
    • Joined on 04-25-2006, 12:33 PM
    • Posts 7

    Hi there Matt!

    Many thanks for your post. I finally made the workaround work, forcing a full postback of the page.

    Thanks a lot!

  • Re: FileUpload workaround not workin on IE

    12-29-2006, 10:18 AM
    • Loading...
    • aidoux
    • Joined on 12-19-2006, 2:00 PM
    • Posts 3

    Hi !

     

    I tried your solutions but i think my case is a little bit more complicated : my FileUpload Control is in an edittemplate of a gridview, in an updatepanel.

    So my first question is : how can you define the ID of the Upload Submit Button  ? I have only access to the ID of the FileUpload ...

    and my second question is : when do i have to register the upload submit button as a PostbackControl ? during the rowdatabinding of the gridview ? during gridview updating ?

     

    Thank you very much in advance for your help because for now it works, but without update panel (i get nothing in the postedfile property of the fileupload with the updatepanel) !

     Axel

  • Re: FileUpload workaround not workin on IE

    12-29-2006, 3:03 PM
    • Loading...
    • gjsduarte
    • Joined on 12-27-2006, 2:43 PM
    • Posts 3

    aidoux, not sure if it's what you are looking for...

    You could try and put another UpdatePanel inside the Gridview Template where you have the FileUpload control. Then just change the UpdateMode of the new UpdatePanel to "Conditional" and add a PostBack Trigger for the FileUpload Control.

    Either this or adding a PostBack trigger for the GridView_RowCommand in the original UpdatePanel should work, I think.

    Give feedback.

    Regards.
    Guilherme Duarte.

Page 1 of 1 (6 items)
Microsoft Communities
Page view counter