I've captured some data from a datareader into a list and now I'm wondering what's the best way to put these out into strings.
The requirement I have is I need to grab field names from a table and then out put these as headings on a page.
objConn = New SqlConnection(strConnection)
objConn.Open()
objCmd = New SqlCommand(strSQL, objConn)
rsData = objCmd.ExecuteReader(0)
If rsData.HasRows Then
Do While (rsData.Read())
Dim SubjectNames As New List(Of String)
SubjectNames.Add(rsData.GetString("subject"))
Loop
SubjectList = SubjectNames.ToArray
Now I was thinking ToArray and was wondering how then to output all of the list entries into strings that I can then use later on.
It's also prudent to note that I'm doing this all inline as the CMS I have to use doesn't allow any code behind.