开发者

asp.net mvc file upload ajax post

Hi I was just wondering if its possible to do an ajax post a file in asp.net mvc, basically i have a form with two buttons, one of the buttons extracts images for the selected docume开发者_开发技巧nt and displays them for the user to choose thumbnails for the document he is about to upload. The usee then fills out the rest of the form and then saves the document.

With the image extraction, I was wondering if it was possible to do that as an ajax post. The other submit button can work as a normal http post Thanks


You may take a look at the jQuery Form plugin which allows you to ajaxify forms that contain file inputs.


Using web controls under MVC application is a real mess. I suggest you to try this sample project. ( Also, there are many useful MVC samples in there )


there sure is. If you use the ajaxForm plugin you should be able to do it no problem. I've implemented this on my site and it works very well. Here's and example: http://jquery.malsup.com/form/#file-upload


Flash upload works the best if its an option as it gives you more flexibility on the UI side. There are a lot of jQuery plugins that will do this. Uploadify is the one I like best. If you can't use Flash, check out this post on how to do jQuery file uploads in asp.net mvc without flash, which uses the jQuery form plugin mentioned previously.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜