Read uploaded file before saving it on hard disk - ASP.NET
Hello
I know how to upload and save uploaded file on hard disk. I used HttpInputFile and HttpPostedFile classes. And then I saved the HttpPostedFile on hard disk. My requirement is to validate the uploaded files before saving them on hard disk. Using HttpPostedFile.InputStream property I can get the stream. I can read the stream in byte array.
But I want to read the individual field of csv file, validate it and then save it to database. Please suggest how to meet this requirement.
Waiting for suggestions
Thank you.
C_sharpkid