ciberperson
Programmer
I have a form of text boxes and radio button lists in C#. The user submits and all is saved to the SQLServer database. But the user can return and make changes to this form. When the user returns I want to retrieve his previously entered values and display them.
I created a DataReader to retrieve the values from the DB. I have a DataList as a container for my form fields. Displaying the value entered for the radio button lists is not clear to me.
I have searched several forums but I have not found the answer.
Here's a radio button list:
<asp:RadioButtonList ID="rbAge" RepeatDirection="Horizontal"
runat="server">
<asp:ListItem>Under 40</asp:ListItem>
<asp:ListItem>Over 40</asp:ListItem>
</asp:RadioButtonList>
In the .cs file I grab the user id and select his entries using a DataReader. Now how do I bind the results to the form fields and how do I display his selection for the radio button lists?
Thanks for any help - it is frustrating to keep looking; maybe I am using the wrong search?
I created a DataReader to retrieve the values from the DB. I have a DataList as a container for my form fields. Displaying the value entered for the radio button lists is not clear to me.
I have searched several forums but I have not found the answer.
Here's a radio button list:
<asp:RadioButtonList ID="rbAge" RepeatDirection="Horizontal"
runat="server">
<asp:ListItem>Under 40</asp:ListItem>
<asp:ListItem>Over 40</asp:ListItem>
</asp:RadioButtonList>
In the .cs file I grab the user id and select his entries using a DataReader. Now how do I bind the results to the form fields and how do I display his selection for the radio button lists?
Thanks for any help - it is frustrating to keep looking; maybe I am using the wrong search?