Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 23, 2006 08:40 PM by tonsai
Member
417 Points
89 Posts
Nov 23, 2006 08:40 PM|LINK
I've amended the user registration form of the cliassfifieds kit to have a check box that a user must ticke to accept some Terms and Conditions.
How would you save this using C#. Currently for normal text fields it saves it using this code in register.aspx.cs :
userProfile.FirstName = (
How would it work for saving a checkbox value from a group of check boxes. Would it be something like:
userProfile.FirstName = (Util.FindControlRecursively("MyCheckBoxes", CreateUserWizardControl.Controls) as CheckBoxList).SelectedValue;
Also would i be right in adding the following style property to the profile section of the web.config
<add name="MyCheckBoxName" type="bool"/>
tonsai
Member
417 Points
89 Posts
How To Store A Bool Checkbox Value in the Profile Provide (SqlProfileProvider)
Nov 23, 2006 08:40 PM|LINK
How would you save this using C#. Currently for normal text fields it saves it using this code in register.aspx.cs :
userProfile.FirstName = (
Util.FindControlRecursively("FirstName", CreateUserWizardControl.Controls) as TextBox).Text;How would it work for saving a checkbox value from a group of check boxes. Would it be something like:
userProfile.FirstName = (Util.FindControlRecursively("MyCheckBoxes", CreateUserWizardControl.Controls) as CheckBoxList).SelectedValue;
Also would i be right in adding the following style property to the profile section of the web.config
<add name="MyCheckBoxName" type="bool"/>