F
fiefie.niles
I am new to ASP.Net. I use VB.NET as the language and Visual Studio
..NET 2003.
On my WebForm I have a label called "Categories".
I would like to read all the categories from the database and placed
them under the label "Categories". I also would like each category to
be a hyperlink to go to another page.
How can I do that ?
Using the codes below the categories are not placed under the label
"Categories", and there is no hyperlink for each item.
Thank you very much.
Dim sSQL As String
Dim drSQL As SqlClient.SqlDataReader
Dim cmdSQL As New SqlClient.SqlCommand()
sSQL = "GetCategories"
With cmdSQL
.Connection = g_Connection
.CommandText = sSQL
drSQL = .ExecuteReader()
End With
If drSQL.HasRows Then
Do While drSQL.Read
Response.Write(drSQL.Item("Categories") & "<br>")
Loop
End If
..NET 2003.
On my WebForm I have a label called "Categories".
I would like to read all the categories from the database and placed
them under the label "Categories". I also would like each category to
be a hyperlink to go to another page.
How can I do that ?
Using the codes below the categories are not placed under the label
"Categories", and there is no hyperlink for each item.
Thank you very much.
Dim sSQL As String
Dim drSQL As SqlClient.SqlDataReader
Dim cmdSQL As New SqlClient.SqlCommand()
sSQL = "GetCategories"
With cmdSQL
.Connection = g_Connection
.CommandText = sSQL
drSQL = .ExecuteReader()
End With
If drSQL.HasRows Then
Do While drSQL.Read
Response.Write(drSQL.Item("Categories") & "<br>")
Loop
End If