Share via


PasswordRecovery.QuestionTitleText 속성

정의

PasswordRecovery 컨트롤의 질문 뷰에 표시되는 제목을 가져오거나 설정합니다.

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

속성 값

질문 뷰의 제목입니다. 기본값은 "ID 확인"입니다.

예제

다음 코드 예제에서는 QuestionTitleText 속성입니다. 사용자가 올바른 사용자 이름을 입력 하지 않으면 합니다 QuestionTitleText 속성에서 다시 설정 됩니다는 AnswerLookupError 이벤트입니다.

<%@ 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">

  void PasswordRecovery1_UserLookupError(object sender, EventArgs e)
  {
    PasswordRecovery1.UserNameTitleText = "Try again";
    PasswordRecovery1.TitleTextStyle.ForeColor = System.Drawing.Color.Red;
  }
  
  void PasswordRecovery1_AnswerLookupError(object sender, EventArgs e)
  {
    PasswordRecovery1.QuestionTitleText = "Try again";
    PasswordRecovery1.TitleTextStyle.ForeColor = System.Drawing.Color.Red;
  }
  
</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" 
    questiontitletext="Password Confirmation Question"
    usernametitletext="Get a new password" OnUserLookupError="PasswordRecovery1_UserLookupError" OnAnswerLookupError="PasswordRecovery1_AnswerLookupError">
    <titletextstyle 
      font-names="Arial" 
      font-bold="True" 
      forecolor="White" 
      backcolor="Gray">
    </titletextstyle>
  </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">

  
  Sub PasswordRecovery1_UserLookupError(ByVal sender As Object, ByVal e As System.EventArgs)
    PasswordRecovery1.UserNameTitleText = "Try again"
    PasswordRecovery1.TitleTextStyle.ForeColor = System.Drawing.Color.Red
  End Sub
  
  Sub PasswordRecovery1_AnswerLookupError(ByVal sender As Object, ByVal e As System.EventArgs)
    PasswordRecovery1.QuestionTitleText = "Try again"
    PasswordRecovery1.TitleTextStyle.ForeColor = System.Drawing.Color.Red
  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" 
    questiontitletext="Password Confirmation Question"
    usernametitletext="Get a new password" OnUserLookupError="PasswordRecovery1_UserLookupError" OnAnswerLookupError="PasswordRecovery1_AnswerLookupError">
    <titletextstyle 
      font-names="Arial" 
      font-bold="True" 
      forecolor="White" 
      backcolor="Gray">
    </titletextstyle>
  </asp:passwordrecovery>

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

설명

QuestionTitleText 속성 암호 확인 질문에 대답 하는 사용자에 게 요청 하는 질문 뷰의 제목으로 표시할 텍스트를 포함 합니다.

스타일 설정을 합니다 TitleTextStyle 속성에 있는 텍스트의 모양을 정의 합니다 QuestionTitleText 속성입니다.

사용 하는 경우는 QuestionTemplate 질문 보기의 모양을 정의 하는 속성을 QuestionTitleText 속성이 적용 되지 않습니다.

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

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

적용 대상

추가 정보