开发者

File upload that looks like ajax

I am trying to create a form which allow async file uploading with asp.net. I realize you cannot upload a file with ajax per se so I am examining alternatives

开发者_如何学C

What is the best way to do this? Create an Iframe on the page with the entire form including the file input? Can I on the parent to the frame have the submit button which forces the frame to submit and then displays some sort of spinner to indicate file is uploading? Ideally upon completion I'd like to redirect the user to another page. Is there a somewhat easy way to do this???


Have you tried using one of the jquery plugins vice doing it by hand?

http://aquantum-demo.appspot.com/file-upload


Why not use the ASP.NET AJAX Control Toolkit's AsyncFileUpload control? It's free and works pretty well.


You could use http://jquery.malsup.com/form/#file-upload

Have it post to a page that will handle a file upload on the server side in your usual way.

I like to have the page return JSON with a success/failure flag and message, then parse the response to determine if the upload succeeded.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜