0
회원별로 새 사용자를 만드십시오. 드롭 다운 메뉴에 몇 가지 질문을 넣을 수 있습니까? 하나를 선택하면 데이터베이스 aspnet_Memberhip PasswordQuestion 필드에 저장됩니다. 일반적으로 멤버쉽은 하나의 질문을 텍스트 상자에 저장하기 때문에 멤버십 프레임 워크의 작동 방식을 잘 모르겠습니다. 당신이 할 수있는회원 보안 : 드롭 다운 메뉴에서 PasswordQuestion을 하나 선택하십시오.
<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>
나는 위의 코드를 사용했다. 왜 데이터베이스에 자동으로 저장됩니까? –
여러분의 코드가 CreateUserWizard (당신이 언급하지 않은 것)의 일부이고 DropDownList의 ID로'Question'을 사용하기 때문입니다. http://www.4guysfromrolla.com/articles/050609-1.aspx –