开发者

MVC post CSV file

开发者 https://www.devze.com 2023-03-19 06:05 出处:网络
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

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.

0

精彩评论

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