A
Alex
Hello All,
I am new to ASP.Net and would like to know how to place
the results from a stored procedure that I call into another form
within my project. Currently, I can see my results in my grid that I
bind to, but have not a clue how to write the results into the
(practice.aspx) page with the different text objects on the form. I'm
passing one parameter that is entered by the user from the first web
page. Here is my code.
Dim objConn As New SqlConnection
Dim Selection As String
Dim spName As String
objConn.ConnectionString =
"Server=IS-5NGB721;Database=Pistol_Test;Trusted_Connection=True;"
objConn.Open()
Dim tbl_will As New DataTable
spName = DropDownListSelect.SelectedItem.Value
Dim find_will As SqlCommand = New SqlCommand("sel_data",
objConn)
find_will.Parameters.Add("@license", Me.TextBoxSelect.Text)
find_will.CommandType = CommandType.StoredProcedure
find_will.ExecuteNonQuery().ToString()
Dim adap As SqlDataAdapter = New SqlDataAdapter(find_will)
adap.Fill(tbl_will)
Me.DataGrid1.DataSource = tbl_will
Me.DataGrid1.DataBind()
objConn.Close()
End Sub
Thanks is advance for your help....
Alex
I am new to ASP.Net and would like to know how to place
the results from a stored procedure that I call into another form
within my project. Currently, I can see my results in my grid that I
bind to, but have not a clue how to write the results into the
(practice.aspx) page with the different text objects on the form. I'm
passing one parameter that is entered by the user from the first web
page. Here is my code.
Dim objConn As New SqlConnection
Dim Selection As String
Dim spName As String
objConn.ConnectionString =
"Server=IS-5NGB721;Database=Pistol_Test;Trusted_Connection=True;"
objConn.Open()
Dim tbl_will As New DataTable
spName = DropDownListSelect.SelectedItem.Value
Dim find_will As SqlCommand = New SqlCommand("sel_data",
objConn)
find_will.Parameters.Add("@license", Me.TextBoxSelect.Text)
find_will.CommandType = CommandType.StoredProcedure
find_will.ExecuteNonQuery().ToString()
Dim adap As SqlDataAdapter = New SqlDataAdapter(find_will)
adap.Fill(tbl_will)
Me.DataGrid1.DataSource = tbl_will
Me.DataGrid1.DataBind()
objConn.Close()
End Sub
Thanks is advance for your help....
Alex