fileupload fails in updatepanel

Discussion in 'ASP .Net Web Controls' started by Jeremy, Dec 12, 2007.

  1. Jeremy

    Jeremy Guest

    I have a fileupload component and a submit button inside an updatepanel.
    (C#, asp2). In the debugger in page load, I see that the hasfile property
    is false, even though the fileupload control was used to select an existing
    file on the client.

    If I move the 2 controls outside the updatepanel then hasfile is true in
    page load.

    How to workaround this?

    Jeremy
    Jeremy, Dec 12, 2007
    #1
    1. Advertising

  2. Jeremy

    Jeremy Guest

    Following up .. On the asp.net ajax site, in the overview page,

    http://www.asp.net/ajax/documentation/live/overview/UpdatePanelOverview.aspx

    I find the following

    "To use a FileUpload control inside an UpdatePanel control, set the postback
    control that submits the file to be a PostBackTrigger control for the
    panel."

    However, this does not work. IOW, adding the submit button's onclick event
    as a trigger does not change anything.

    Jeremy



    "Jeremy" <> wrote in message
    news:...
    >I have a fileupload component and a submit button inside an updatepanel.
    >(C#, asp2). In the debugger in page load, I see that the hasfile property
    >is false, even though the fileupload control was used to select an existing
    >file on the client.
    >
    > If I move the 2 controls outside the updatepanel then hasfile is true in
    > page load.
    >
    > How to workaround this?
    >
    > Jeremy
    Jeremy, Dec 12, 2007
    #2
    1. Advertising

  3. Jeremy

    Shamus Guest

    On Dec 13, 12:58 am, "Jeremy" <> wrote:
    > Following up .. On the asp.net ajax site, in the overview page,
    >
    > http://www.asp.net/ajax/documentation/live/overview/UpdatePanelOvervi...
    >
    > I find the following
    >
    > "To use a FileUpload control inside an UpdatePanel control, set the postback
    > control that submits the file to be a PostBackTrigger control for the
    > panel."
    >
    > However, this does not work. IOW, adding the submit button's onclick event
    > as a trigger does not change anything.
    >
    > Jeremy
    >
    > "Jeremy" <> wrote in message
    >
    > news:...
    >
    > >I have a fileupload component and a submit button inside an updatepanel.
    > >(C#, asp2). In the debugger in page load, I see that the hasfile property
    > >is false, even though the fileupload control was used to select an existing
    > >file on the client.

    >
    > > If I move the 2 controls outside the updatepanel then hasfile is true in
    > > page load.

    >
    > > How to workaround this?

    >
    > > Jeremy


    Post your code...
    Shamus, Dec 16, 2007
    #3
  4. On Dec 12, 6:58 pm, "Jeremy" <> wrote:
    > I have a fileupload component and a submit button inside an updatepanel.
    > (C#, asp2). In the debugger in page load, I see that the hasfile property
    > is false, even though the fileupload control was used to select an existing
    > file on the client.
    >
    > If I move the 2 controls outside the updatepanel then hasfile is true in
    > page load.
    >
    > How to workaround this?
    >
    > Jeremy


    Jeremy,

    The UpdatePanel control is incompatible with the FileUpload control.
    Period.

    I have a simple control at http://pjondevelopment.50webs.com/articles/asyncupload.html
    that people are using to circunvent this problem.

    Take a look.

    Regards,

    Paulo Santos.
    http://pjondevelopment.50webs.com
    PJ on Development, Dec 17, 2007
    #4
    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. Replies:
    1
    Views:
    476
  2. GaryDean

    FileUpload Control within UpdatePanel

    GaryDean, May 4, 2008, in forum: ASP .Net
    Replies:
    6
    Views:
    580
    Anil Abraham
    May 28, 2008
  3. Bogdan
    Replies:
    2
    Views:
    2,242
    Bogdan
    Aug 10, 2009
  4. Mario

    FileUpload in UpdatePanel

    Mario, Jun 1, 2010, in forum: ASP .Net
    Replies:
    1
    Views:
    515
  5. Ne7ven
    Replies:
    0
    Views:
    1,678
    Ne7ven
    Apr 18, 2011
Loading...

Share This Page