Getting Error on converting an array into a string
Value of type 'string' cannot be converted to 'system.collections.arraylist'
What do I need to do to read a .CSV file into a datagrid?
BTW: its some 8000 lines long
DougP
Code:
Dim Filename As String = Session("SPMIDTextFile")
Dim SPMIData, LineToRead As String
Dim SPMID, CostTracker As String
SPMIData = GetFileContents(Filename)
Dim strReader As New StringReader(SPMIData)
Dim a As Integer
Dim SPMIDCostrakr As ArrayList
Do While strReader.Peek() >= 0
SPMIDCostrakr = strReader.ReadLine() '<<< Blue squiggly here, see below
Loop
' Bind the results to the GridView
GridView1.DataSource = SPMIDCostrakr
GridView1.DataBind()
Value of type 'string' cannot be converted to 'system.collections.arraylist'
What do I need to do to read a .CSV file into a datagrid?
BTW: its some 8000 lines long
DougP