다음을 통해 공유


PasswordRecovery.GeneralFailureText 속성

정의

PasswordRecovery 컨트롤에 대한 멤버 자격 공급자에 문제가 있을 경우 표시되는 오류 메시지를 가져오거나 설정합니다.

public:
 virtual property System::String ^ GeneralFailureText { System::String ^ get(); void set(System::String ^ value); };
public virtual string GeneralFailureText { get; set; }
member this.GeneralFailureText : string with get, set
Public Overridable Property GeneralFailureText As String

속성 값

사용자의 암호를 보내지 않을 전자 메일을 통해 멤버 자격 공급자에 문제가 있어 경우 표시할 오류 메시지입니다. 기본값은 "Your attempt to retrieve your password has failed. 다시 시도하세요”와 같은 오류로 인해 실패합니다.

예제

다음 코드 예제에서는 GeneralFailureText 속성입니다.

<%@ 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">
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:PasswordRecovery id="PasswordRecovery1" runat="server" 
            GeneralFailureText="You password cannot be retrieved at this time. Please try again later." 
            QuestionFailureText="Your answer does not match the stored answer. Please try again." 
            UserNameFailureText="We couldn't find that user name. Please try again.">
            <FailureTextStyle backcolor="Red" forecolor="White"></FailureTextStyle>
        </asp:PasswordRecovery>
    </form>
</body>
</html>
<%@ 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">

    ' Insert page code here
    '

</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:PasswordRecovery id="PasswordRecovery1" runat="server" 
            GeneralFailureText="You password cannot be retrieved at this time. Please try again later." 
            QuestionFailureText="Your answer does not match the stored answer. Please try again." 
            UserNameFailureText="We couldn't find that user name. Please try again.">
            <FailureTextStyle backcolor="Red" forecolor="White"></FailureTextStyle>
        </asp:PasswordRecovery>
        <!-- Insert content here -->
    </form>
</body>
</html>

설명

합니다 GeneralFailureText 속성에 대 한 사용자 정보를 관리 하는 멤버 자격 공급자에 문제가 있을 때 사용자에 게 표시 되는 PasswordRecovery 제어 합니다. 일반적으로 GeneralFailureText 속성은 멤버 자격 공급자는 사용자 정보가 포함 된 데이터 저장소에 연결할 수 없을 때 표시 됩니다.

에 지정 된 텍스트는 UserNameFailureText 속성 공급자 데이터베이스에 지정된 된 사용자 이름을 찾을 수 없는 경우 사용자 이름 뷰에 표시 됩니다. QuestionFailureText 속성은 사용자가 입력 한 저장된 된 대답과 일치 하지 않는 경우 질문 뷰에 표시 됩니다. GeneralFailureText 다른 모든 오류에 대 한 속성이 표시 됩니다.

모양의 합니다 GeneralFailureText 속성의 스타일 설정에 의해 정의 됩니다는 FailureTextStyle 속성입니다.

모양을 정의 하는 템플릿을 설정 하는 경우는 PasswordRecovery 컨트롤을 GeneralFailureText 선택적인에 속성이 표시 됩니다 Literal "FailureText"로 설정 하는 컨트롤 ID 사용 하 여 컨트롤입니다.

속성에 대 한 기본 텍스트는 서버의 로캘 설정에 따라 지역화 됩니다.

이 속성의 값으로 설정 된 경우 디자이너 도구를 사용 하 여 리소스 파일에 자동으로 저장 될 수 있습니다. 자세한 내용은 LocalizableAttribute 하 고 전역화 및 지역화합니다.

적용 대상

추가 정보