B
Big E
I create a Connection, SQL DataAdapter, DataTable, DataSet and Fill the
Table. Now I want to bind the data in the Table to textboxes on the ASP.Net
page. I thought I could do something as simple as Textbox1.Text =
dtReg.Columns.Row(dataintable). I would rather do it in the .vb file than in
the aspx page.
I can't figure out how to do it.
Thanks.
Dim Portal As String
Dim dsReg As DataSet
Dim cnPortal As SqlConnection
Dim daReg As SqlDataAdapter
Dim dtReg As DataTable = New DataTable
Portal = ConfigurationSettings.AppSettings("Portal.ConnectionString")
dsReg = New DataSet
cnPortal = New SqlConnection(Portal)
daReg = New SqlDataAdapter("SELECT * FROM tblProspect WHERE Fname= '" &
varFirstName & "' and Lname ='" & varLastName & "'and HomePhone ='" &
varPhone & "'", cnPortal)
daReg.Fill(dsReg, "tblProspect")
dtReg = dsReg.Tables("tblProspect")
Table. Now I want to bind the data in the Table to textboxes on the ASP.Net
page. I thought I could do something as simple as Textbox1.Text =
dtReg.Columns.Row(dataintable). I would rather do it in the .vb file than in
the aspx page.
I can't figure out how to do it.
Thanks.
Dim Portal As String
Dim dsReg As DataSet
Dim cnPortal As SqlConnection
Dim daReg As SqlDataAdapter
Dim dtReg As DataTable = New DataTable
Portal = ConfigurationSettings.AppSettings("Portal.ConnectionString")
dsReg = New DataSet
cnPortal = New SqlConnection(Portal)
daReg = New SqlDataAdapter("SELECT * FROM tblProspect WHERE Fname= '" &
varFirstName & "' and Lname ='" & varLastName & "'and HomePhone ='" &
varPhone & "'", cnPortal)
daReg.Fill(dsReg, "tblProspect")
dtReg = dsReg.Tables("tblProspect")