views:

39

answers:

3

how to upload files using ajax in jquery.

system: windows 7, iis, asp.net, c#

A: 

AJAX doesn't support file upload. Your best bet to achieve a "background" upload is to use a hidden iframe and trigger the upload from that using a normal post (first result from googling "hidden iframe upload .net"). You can build up AJAX-based code that will track the progress of the upload by querying the server to see how much of the total upload has completed, but the upload itself needs to use a normal post. Other alternatives include Java- or Flash-based file uploaders.

tvanfosson
A: 

Similar question answered here:

http://stackoverflow.com/questions/3190809/synchronous-ajax

IrishChieftain
A: 

check out this : http://malsup.com/jquery/form/#file-upload

D.J