c# - Reading contents of CSV file -


i have loaded csv file

here sample of content available in csv file

name,address,address1,landmark,user_location,city,state,phone1,phone2,email,category sriram electricals , plumbing contractors,no 12, vinayakar koil street easa,"back side of therasa school,",pallavaram,chennai,tamil nadu,(044) 66590405,,sriram@gmail.com,electrican 

i've tried convert file list

public actionresult usercsv(httppostedfilebase uploadfile) {           using (var sr = new streamreader(uploadfile.inputstream, encoding.utf8))     {             var reader = new csvreader(sr);           //csvreader read whole file enumerable          ienumerable<usercsvmodel> records = reader.getrecords<usercsvmodel>();     } } 

unable correct output.

try article:

http://www.codeproject.com/articles/415732/reading-and-writing-csv-files-in-csharp

or q on stack on flow:

reading csv file , storing values array

hope helps.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -