So I'm trying to read a text file line by line and I've been using this code
1 Dim fp As StreamReader
2 Try
3 Dim location As String = "textfiles\"
4 Dim fileloc As String = location & FileUpload1.FileName
5 fp = File.OpenText(Server.MapPath(fileloc))
6 Dim arrText As New ArrayList
7
8 Do While Not (fp.EndOfStream)
9 arrText.Add(fp.ReadLine)
10 Loop
11 Catch ex As Exception
12
13 End Try
I've looked at a few examples on line and going by those examples this should work and it does to a degree.It does populate the arraylist with the files contents but then I get this error message
Go to the complete details ...