Share via


PasswordRecovery.InstructionTextStyle 속성

정의

PasswordRecovery 컨트롤의 설명 텍스트 모양을 정의하는 스타일 속성이 들어 있는 컬렉션에 대한 참조를 가져옵니다.

public:
 property System::Web::UI::WebControls::TableItemStyle ^ InstructionTextStyle { System::Web::UI::WebControls::TableItemStyle ^ get(); };
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
public System.Web.UI.WebControls.TableItemStyle InstructionTextStyle { get; }
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]
member this.InstructionTextStyle : System.Web.UI.WebControls.TableItemStyle
Public ReadOnly Property InstructionTextStyle As TableItemStyle

속성 값

TableItemStyle

설명 텍스트의 모양을 정의하는 속성이 들어 있는 TableItemStyle에 대한 참조입니다.

특성

예제

다음 코드 예제에서는 InstructionTextStyle 속성을 설정하는 방법을 보여 줍니다.

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

  // <Snippet2>
  void PasswordRecovery1_UserLookupError(object sender, EventArgs e)
  {
    PasswordRecovery1.UserNameInstructionText = "Enter the correct Web site user name.";
    PasswordRecovery1.InstructionTextStyle.ForeColor = System.Drawing.Color.Red;
  }
  // </Snippet2>
  
  // <Snippet4>
  void PasswordRecovery1_AnswerLookupError(object sender, EventArgs e)
  {
    PasswordRecovery1.QuestionInstructionText = "Enter the correct answer to this question.";
    PasswordRecovery1.InstructionTextStyle.ForeColor = System.Drawing.Color.Red;
  }
  // </Snippet4>
  
</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" 
    questioninstructiontext="Enter the answer to the password confirmation question."
    usernameinstructiontext="Enter your Web site user name." 
    OnUserLookupError="PasswordRecovery1_UserLookupError" OnAnswerLookupError="PasswordRecovery1_AnswerLookupError">
    <instructiontextstyle 
      font-size="Smaller" 
      font-names="Comic Sans MS" 
      font-italic="True" 
      forecolor="Blue">
    </instructiontextstyle>
  </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">

  ' <Snippet2>
  Sub PasswordRecovery1_UserLookupError(ByVal sender As Object, ByVal e As System.EventArgs)
    PasswordRecovery1.UserNameInstructionText = "Enter the correct Web site user name."
    PasswordRecovery1.InstructionTextStyle.ForeColor = System.Drawing.Color.Red
  End Sub
  ' </Snippet2>
  
  ' <Snippet4>
  Sub PasswordRecovery1_AnswerLookupError(ByVal sender As Object, ByVal e As System.EventArgs)
    PasswordRecovery1.QuestionInstructionText = "Enter the correct answer to this question."
    PasswordRecovery1.InstructionTextStyle.ForeColor = System.Drawing.Color.Red
  End Sub
  ' </Snippet4>
</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" 
    questioninstructiontext="Enter the answer to the password confirmation question."
    usernameinstructiontext="Enter your Web site user name." 
    OnUserLookupError="PasswordRecovery1_UserLookupError" OnAnswerLookupError="PasswordRecovery1_AnswerLookupError">
    <instructiontextstyle 
      font-size="Smaller" 
      font-names="Comic Sans MS" 
      font-italic="True" 
      forecolor="Blue">
    </instructiontextstyle>
  </asp:passwordrecovery>
</form>
</body>
</html>

설명

합니다 InstructionTextStyle 속성의 설명 텍스트 모양을 정의 합니다 PasswordRecovery 제어 합니다. 이 속성은 읽기 전용입니다. 그러나의 속성을 설정할 수는 Style 개체를 반환 합니다. 형식에서 속성을 선언적으로 설정할 수 있습니다 Property-Subproperty, 여기서 Subproperty 의 속성을 나타냅니다 합니다 Style 클래스 (예를 들어 InstructionTextStyle-ForeColor). 형태로 속성을 프로그래밍 방식으로 설정할 수도 있습니다 Property.Subproperty (예를 들어 InstructionTextStyle.ForeColor).

일반 설정 사용자 지정 배경색, 텍스트 색 및 글꼴 속성을 포함 합니다. InstructionTextStyle 속성은 다음 속성의 모양을 정의 합니다.

설정에 대 한 스타일을 InstructionTextStyle 속성에 대 한 스타일 설정이 병합 됩니다는 PasswordRecovery 제어 합니다. 모든 설정이 합니다 InstructionTextStyle 속성의 속성에서 해당 설정을 재정의 PasswordRecovery 제어 합니다.

다음 PasswordRecovery 컨트롤 속성에 의해 재정의 됩니다 InstructionTextStyle 속성:

모양을 정의 하는 데 템플릿을 사용할 때의 PasswordRecovery 컨트롤의 사용자 이름 보기 또는 질문 보기는 InstructionTextStyle 속성이 적용 되지 않습니다.

적용 대상

추가 정보