Alex Rivera | Logout

File uploading in AJAX updatepanel without full postback

Asked 2009-04-28T10:13:51.550
20

I have a update panel, in the update panel I have fileupload control and button control, On button click, I need the file that I have upload in the fileupload control in updatepanel.

Exact scenario, I have 8 tabs on page, each tab contains too much information, One of the tab is Attachment, when user click on Add New Attachment Modal Popup shown, Modal contains detailsview in Updatepanel and in the detailsview I have fileupload control, when user hit save button, detailsview inserting event fired, In the inserting event I need the file that I have upload.
Please Note, My page is heavy and I don't want full postBack.


Does anyone have solution of this issue?

Advance thanks for your kind help.....

Edit
Report

1 Answer

0

I recommend the uploader widget from YUI. See http://developer.yahoo.com/yui/uploader/

I think you could use it to accomplish your goal. Your javascript would need to fetch the file back down to the client from the server after it completed its upload. But the page would not refresh--the upload is through flash and a hidden iframe. The download to show the file's contents to the user would be via ajax.

If the user does not "approve" the upload, then simply make another ajax call to the server to delete the file.

answered 2009-06-12T03:01:07.320

Your Answer