Search code examples
c#asp.netfile-uploadupdatepanelasyncfileupload

How to upload an image when fileupload control is under updatepanel?


How to upload an image when fileupload is under updatepanel?

I have a button say "upload" inside that update panel.

When I click that button inside the button click event I got the fileupload hasfile=false. Please suggest if there is any way to upload image file when fileupload control is inside update panel and the button is making asyncpostback.

Thanks in advance.


Solution

  • you can use AJAX AsyncFileUpload control

    http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AsyncFileUpload/AsyncFileUpload.aspx

    Also check this thread. File uploading in AJAX updatepanel without full postback