I am looking for the better solution to import CSV file in ASP.NET MVC.
Basically want asynchronously submit the file to the controller and then i need to parse this comma delimited file, i dont need to store th开发者_运维技巧e file on server.
What is the batter way of submit this file to controller i may use? Recently i found that solution http://blog.stevensanderson.com/2008/11/24/jquery-ajax-uploader-plugin-with-progress-bar/ but it is used flash to do the upload. i think i would prefer javascript to do that.
What do you think?
UPDATED Some links to look at:
http://aspzone.com/tech/jquery-file-upload-in-asp-net-mvc-without-using-flash/
http://jquery.malsup.com/form/#file-upload
http://valums.com/ajax-upload/
i think i would prefer javascript to do that.
You cannot upload files using AJAX. If it is with the user consent you could create a simple html form with input type="file" field and then AJAXify this form using the jquery.form plugin. This plugin supports also file uploads. And to workaround the limitation that you cannot upload files using javascript it uses a hidden iframe.
精彩评论