Saturday, March 24, 2012

upload doesnt work inside Update Panel.

I put following code inside an UpdatePanel. The upload control doesn't work.
If I remove the updatepanel, the it is OK.

<input id="fileUpload" type="file" size="60" name="fileUpload" runat="server" />
<asp:Button ID="btnUpload" runat="server" Text="Upload"></asp:Button>You're right, this is a known issue. Do a search.
Hi~ One walk around to this is to put an iframe in update panel and do the upload in the page held in that iframe~

I'm sorry, but has anybody found the solution for this problem?


File uplod is not suposed to work within update pannel.
Solution how to overcome this behavior:
http://msmvps.com/blogs/luisabreu/archive/2006/12/14/uploading-files-without-a-full-postback.aspx

Maybe this helps...

Or add a button beside file upload control with name "Upload file" and add postback trigger to update pannel for that button click event. File will be uploaded when this button is pressed but page then will do normal postback

Mindaugas

No comments:

Post a Comment