Share via


PasswordRecovery 웹 서버 컨트롤 선언

업데이트: 2007년 11월

사용자가 잊어버린 암호를 복구 또는 재설정한 후 전자 메일을 통해 받을 수 있는 사용자 인터페이스를 제공합니다.

<asp:PasswordRecovery
    AccessKey="string"
    AnswerLabelText="string"
    AnswerRequiredErrorMessage="string"
    BackColor="color name|#dddddd"
    BorderColor="color name|#dddddd"
    BorderPadding="integer"
    BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge|
        Inset|Outset"
    BorderWidth="size"
    CssClass="string"
    Enabled="True|False"
    EnableTheming="True|False"
    EnableViewState="True|False"
    Font-Bold="True|False"
    Font-Italic="True|False"
    Font-Names="string"
    Font-Overline="True|False"
    Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|
        Large|X-Large|XX-Large"
    Font-Strikeout="True|False"
    Font-Underline="True|False"
    ForeColor="color name|#dddddd"
    GeneralFailureText="string"
    Height="size"
    HelpPageIconUrl="uri"
    HelpPageText="string"
    HelpPageUrl="uri"
    ID="string"
    MailDefinition-BodyFileName="uri"
    MailDefinition-CC="string"
    MailDefinition-From="string"
    MailDefinition-IsBodyHtml="True|False"
    MailDefinition-Priority="Normal|Low|High"
    MailDefinition-Subject="string"
    MembershipProvider="string"
    OnAnswerLookupError="AnswerLookupError event handler"
    OnDataBinding="DataBinding event handler"
    OnDisposed="Disposed event handler"
    OnInit="Init event handler"
    OnLoad="Load event handler"
    OnPreRender="PreRender event handler"
    OnSendingMail="SendingMail event handler"
    OnSendMailError="SendMailError event handler"
    OnUnload="Unload event handler"
    OnUserLookupError="UserLookupError event handler"
    OnVerifyingAnswer="VerifyingAnswer event handler"
    OnVerifyingUser="VerifyingUser event handler"
    QuestionFailureText="string"
    QuestionInstructionText="string"
    QuestionLabelText="string"
    QuestionTitleText="string"
    runat="server"
    SkinID="string"
    Style="string"
    SubmitButtonImageUrl="uri"
    SubmitButtonText="string"
    SubmitButtonType="Button|Image|Link"
    SuccessPageUrl="uri"
    SuccessText="string"
    TabIndex="integer"
    TextLayout="TextOnLeft|TextOnTop"
    ToolTip="string"
    UserName="string"
    UserNameFailureText="string"
    UserNameInstructionText="string"
    UserNameLabelText="string"
    UserNameRequiredErrorMessage="string"
    UserNameTitleText="string"
    Visible="True|False"
    Width="size"
>
        <FailureTextStyle />
        <HyperLinkStyle />
        <InstructionTextStyle />
        <LabelStyle />
        <MailDefinition
            BodyFileName="uri"
            CC="string"
            From="string"
            IsBodyHtml="True|False"
            Priority="Normal|Low|High"
            Subject="string"
>
                <EmbeddedObjects>
                        <asp:EmbeddedMailObject
                            Name="string"
                            Path="uri"
                        />
                </EmbeddedObjects>
        </MailDefinition>
        <QuestionTemplate>
            <!-- child controls -->
        </QuestionTemplate>
        <SubmitButtonStyle />
        <SuccessTemplate>
            <!-- child controls -->
        </SuccessTemplate>
        <SuccessTextStyle />
        <TextBoxStyle />
        <TitleTextStyle />
        <UserNameTemplate>
            <!-- child controls -->
        </UserNameTemplate>
        <ValidatorTextStyle />
</asp:PasswordRecovery>

설명

PasswordRecovery는 사용자가 암호를 잊어버린 경우에 도움을 주는 컨트롤입니다. 이 컨트롤을 통해 사용자는 새로운 암호 또는 해당 사용자 계정의 관련 암호가 포함된 전자 메일 메시지를 보내 달라고 요청할 수 있습니다.

참고   PasswordRecovery 컨트롤은 복구된 암호나 새 암호를 인터넷 전자 메일 서비스를 사용하여 사용자에게 보냅니다. 전자 메일을 통해 암호를 보내는 것은 보안상 위험하므로 이 컨트롤을 사용할 때는 이러한 위험 요소가 허용 가능한 수준에 속하는지 확인해야 합니다.

PasswordRecovery 컨트롤 및 기타 Login 컨트롤에 대한 자세한 내용은 ASP.NET Login 컨트롤을 참조하십시오.

예제

다음 코드 예제에서는 PasswordRecovery 컨트롤을 사용하는 방법을 보여 줍니다. 여기에서는 LoadUserLookupError 이벤트에 대한 처리기를 정의하고 HelpPageUrl 속성을 recoveryHelp.aspx 파일로 설정합니다.

<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

    ' Set the field label background color if the user name is not found.
    Sub PasswordRecovery1_UserLookupError(ByVal sender As Object, ByVal e As System.EventArgs)
        PasswordRecovery1.LabelStyle.ForeColor = System.Drawing.Color.Red
    End Sub

    ' Reset the field label background color.
    Sub PasswordRecovery1_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        PasswordRecovery1.LabelStyle.ForeColor = System.Drawing.Color.Black
    End Sub
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
        <form id="form1" runat="server">
            <asp:PasswordRecovery id="PasswordRecovery1" runat="server" BorderStyle="Solid" BorderWidth="1px" BackColor="#F7F7DE"
                Font-Size="10pt" Font-Names="Verdana" BorderColor="#CCCC99" HelpPageText="Need help?" HelpPageUrl="recoveryHelp.aspx" onuserlookuperror="PasswordRecovery1_UserLookupError" onload="PasswordRecovery1_Load" >
                <successtemplate>
                    <table border="0" style="font-size:10pt;">
                        <tr>
                            <td>Your password has been sent to you.</td>
                        </tr>
                    </table>

                </successtemplate>
                <titletextstyle font-bold="True" forecolor="White" backcolor="#6B696B">
                </titletextstyle>
            </asp:PasswordRecovery>

        </form>
    </body>
</html>
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

    // Set the field label background color if the user name is not found.
    void PasswordRecovery1_UserLookupError(object sender, System.EventArgs e)
    {
        PasswordRecovery1.LabelStyle.ForeColor = System.Drawing.Color.Red;
    }

    // Reset the field label background color.
    void PasswordRecovery1_Load(object sender, System.EventArgs e)
    {
        PasswordRecovery1.LabelStyle.ForeColor = System.Drawing.Color.Black;
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
        <form id="form1" runat="server">
            <asp:PasswordRecovery id="PasswordRecovery1" runat="server" BorderStyle="Solid" BorderWidth="1px" BackColor="#F7F7DE"
                Font-Size="10pt" Font-Names="Verdana" BorderColor="#CCCC99" HelpPageText="Need help?" HelpPageUrl="recoveryHelp.aspx" onuserlookuperror="PasswordRecovery1_UserLookupError" onload="PasswordRecovery1_Load" >
                <successtemplate>
                    <table border="0" style="font-size:10pt;">
                        <tr>
                            <td>Your password has been sent to you.</td>
                        </tr>
                    </table>

                </successtemplate>
                <titletextstyle font-bold="True" forecolor="White" backcolor="#6B696B">
                </titletextstyle>
            </asp:PasswordRecovery>

        </form>
    </body>
</html>

참고 항목

참조

PasswordRecovery

기타 리소스

ASP.NET Login 컨트롤