Create new user by Membership.
Can I put several questions in a dropdown menu? When I pick up one, then it will be saved into the database aspnet_Memberhip PasswordQuestion field?
Because usually membership will save one question in a text box, I am not sure how the membership framework works.
<tr>
<td>Question:</td>
<td>
<%--<asp:TextBox runat="server" ID="Question" Height="30px" Width="311px" />--%>
<asp:DropDownList ID="Question" runat="server">
<asp:ListItem>What is the city of your birth?</asp:ListItem>
<asp:ListItem>What school did you attend for sixth grade?</asp:ListItem>
<asp:ListItem>What is your maternal grandmother's maiden name?</asp:ListItem>
<asp:ListItem>Where were you when you had your first kiss?</asp:ListItem>
<asp:ListItem>Who was your childhood hero?</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator12" ControlToValidate="Question"
ErrorMessage="Question is required." />
</td>
</tr>
<tr>
<td>Answer:</td>
<td>
<asp:TextBox runat="server" ID="Answer" Height="22px" Width="217px" />
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator14" ControlToValidate="Answer"
ErrorMessage="Answer is required." />
</td>
</tr>
You can, you just need to pass the SelectedItem
.Textto the CreateUser-Method. The Question or Answer must not be unique.http://msdn.microsoft.com/en-us/library/system.web.security.membershipuser.passwordquestion.aspx