I want to select all the values from a table in my database and then put each value in order into labels that are on the asp page.
I can Select all the values from that database fine but I am rather stuck as how to put the values into the individual labels? Here is the code I have connecting to my database.
Dim cmd As New SqlCommand
Dim myConnection As New SqlConnection("Data Source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\Alerts.mdf;User Instance=true")
cmd.Connection = myConnection
cmd.CommandText = "SELECT DateTime, Description FROM EmailTemplateLoad"
Catch ex As Exception
How can I put the DateTime value into Label1 and the Decription into Label2??
I have had a nose about but can't seem to find the information I need.
Any pointers greatly appreciated.
View Complete Post