/ Published in: VB.NET
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Using myConnection As New SqlConnection myConnection.ConnectionString = ConfigurationManager.ConnectionStrings("strConn").ConnectionString Dim myCommand As New SqlCommand myCommand.Connection = myConnection myCommand.CommandText = "spSelect" myCommand.CommandType = CommandType.StoredProcedure myCommand.Parameters.AddWithValue("@User", ViewState("User").toString()) myConnection.Open() Using dtrReader As SqlDataReader = myCommand.ExecuteReader() While dtrReader.Read() strLink = dtrReader("Title") End While End Using End Using