简体   繁体   中英

csv file upload on asp.net

User need to upload 30,000 csv values, these values may contain 16 digit numbers or zipcodes.

Now our asp.net project doesn't use AJAX tool kit controls or jquery or any other 3rd party controls or open source code. This is restriction as per companies privacy policy.

So I have to come with a best way to accommodate file upload feature. This has to be versatile in regards to re-usability some thing like a custom control

This file upload feature should not be saved on the server, instead I need to read data into stream buffer and send them to UI then once user verify these values he/she'll have to hit submit thus values will be saved to DB.

what are the best ways to implement this,

  • Can I make use of System.Net.Webclient ? or
  • Is there any other alternative ways by using Async HttpHandlers ?
  • Can I show file upload progress to UI ?

Appreciate if you could help me with proper guidence on this.

Thanks in advance krish

Well 30,000 values of zipcode or any other 16 digit code should be uploadable normally using file control(i mean via postback).

if you have to read and show 30,000 on the UI, i presume you are at risk of freezing your UI.

Moreover if you are not on HTML5, there is no way that you can read the content on the client side, except if you fiddle around with flash.

HTML 5 file api reference http://www.html5rocks.com/en/tutorials/file/filesystem/

How to read and write files with Flash(Action script)

http://www.mikechambers.com/blog/2008/08/20/reading-and-writing-local-files-in-flash-player-10/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM