P
Phillip Vong
I'm new and trying to learn. This is in VB.NET 2. I have a simple page
with one Textbox1, one Label1 and one Button1. The on_click Button one goes
and get's a simple data from the SQL db with the parameter from Textbox1.
What do I add to this code below to say that Label1 equals the result of my
Select statement? CroftUser being the result.
Thanks!
Newbie
-------------------------------
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim ds As New SqlDataSource()
ds.ConnectionString =
ConfigurationManager.ConnectionStrings("CroftDBConnectionString").ConnectionString
ds.SelectCommandType = SqlDataSourceCommandType.Text
ds.SelectCommand = "Select CroftUser From [User] Where (Password =
@Password)"
ds.SelectParameters.Add("Password", TextBox1.Text)
End Sub
with one Textbox1, one Label1 and one Button1. The on_click Button one goes
and get's a simple data from the SQL db with the parameter from Textbox1.
What do I add to this code below to say that Label1 equals the result of my
Select statement? CroftUser being the result.
Thanks!
Newbie
-------------------------------
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim ds As New SqlDataSource()
ds.ConnectionString =
ConfigurationManager.ConnectionStrings("CroftDBConnectionString").ConnectionString
ds.SelectCommandType = SqlDataSourceCommandType.Text
ds.SelectCommand = "Select CroftUser From [User] Where (Password =
@Password)"
ds.SelectParameters.Add("Password", TextBox1.Text)
End Sub