how to check number of records in .csv file using asp.net/vb.net


I have .csv file in my http://mywebsite/folder1/test.csv" using asp.net/vb.net.
 i want to check are there any records in it or not how can i check this.

Thanks
ram27Asked:
Who is Participating?
 
CodeCruiserConnect With a Mentor Commented:
In CSV, each record is usually on a separate line so do the following


RecordCount = IO.File.ReadAllLines("path").Length()

Open in new window

0
 
David L. HansenProgrammer AnalystCommented:
'Split the file into an array of Records
     Dim chrReturn As Char = Chr(13)
     Dim strRecordsAsWhole As String() = strCsvFile.Split(chrReturn)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.