G
G
Hello,
Fairly new to .net (using c#).
I am running an SQL query which always returns ONE ROW and no more. I would
like to have the ID field of the returned row bound to a TextBox onSubmit.
AT the moment I have used the following controls:
<asp:SqlDataSource ID="DStypes" runat="server" />
<asp:GridView ID="GVtypes" runat="server"
DataSourceID="DStypes">
</asp:GridView>
This returns the entire row, I was using this to test the data returned was
correct. I would like to amend this code if possible to no longer return
the datagrid, but simply the value of the ID field, and stick it inside my
TextBox.
Should I be using SqlDataSource to achieve this?
Regards,
Gary.
Fairly new to .net (using c#).
I am running an SQL query which always returns ONE ROW and no more. I would
like to have the ID field of the returned row bound to a TextBox onSubmit.
AT the moment I have used the following controls:
<asp:SqlDataSource ID="DStypes" runat="server" />
<asp:GridView ID="GVtypes" runat="server"
DataSourceID="DStypes">
</asp:GridView>
This returns the entire row, I was using this to test the data returned was
correct. I would like to amend this code if possible to no longer return
the datagrid, but simply the value of the ID field, and stick it inside my
TextBox.
Should I be using SqlDataSource to achieve this?
Regards,
Gary.