Click to See Complete Forum and Search --> : FileUpload and Ajax


Chen.Fisher
January 16th, 2007, 03:32 AM
Hi,

I'm using .Net 2.0, Ajax extension.

I'm trying to use the FileUpload and Ajax so the file upload will post itself and not the whole page. It doesn't work.

I read somewhere that there is no Ajax support for FileUpload control yet. Is that right?

I want the user to upload a file and see an animated gif as the progress bar while the file is uploading.

10x.

dmeikle
January 18th, 2007, 05:40 PM
I'd heard it's not possible and read just yesterday that with Microsoft's Atlas/ Ajax Beta it's NOT possible, due to how the XMLHttpRequest object handles connections.

vkshrestha
March 31st, 2007, 02:31 AM
FileUpload and some other controls are not compatible with ajax extensions. You can revise at http://ajax.asp.net/docs/overview/UpdatePanelOverview.aspx

However, you can use iframes to make ajax-like file upload system, and make it work with ajax extensions. Here are my blog posts which also includes downloadable source code:

full tutorial:
http://vinayakshrestha.wordpress.com/2007/03/13/uploading-files-using-aspnet-ajax-extensions/
and download link:
http://vinayakshrestha.wordpress.com/2007/03/31/ajax-extensions-file-upload-workaround/

You can easily add javascripts to show and hide your animated image, when button is clicked and after process is complete (in RegisterStartupScript method)