PasswordRecovery.QuestionInstructionText プロパティ

定義

パスワード回復用の確認質問に答えるようユーザーに指示するために、質問ビューに表示するテキストを取得または設定します。Gets or sets the text to display in the Question view to instruct the user to answer the password recovery confirmation question.

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

プロパティ値

String

質問ビューに表示する指示テキスト。The instruction text to display in the Question view. 既定値は、"パスワードを取得するために、次の質問に返答してください。" です。The default is "Answer the following question to receive your password."

次のコード例では、QuestionInstructionText プロパティを設定します。The following code example sets the QuestionInstructionText property.

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

注釈

この QuestionInstructionText プロパティは、パスワード回復の確認の質問に回答するようユーザーに指示するために、質問ビューに表示されます。The QuestionInstructionText property is displayed in Question view to instruct the user to answer the password recovery confirmation question.

プロパティのスタイル設定により、 InstructionTextStyle プロパティの外観が定義され QuestionInstructionText ます。The style settings in the InstructionTextStyle property define the appearance of the QuestionInstructionText property.

プロパティを使用して QuestionTemplate 質問ビューの外観を定義する場合、 QuestionInstructionText プロパティは無効です。When you use the QuestionTemplate property to define the appearance of the Question view, the QuestionInstructionText property has no effect.

プロパティの既定のテキストは、サーバーのロケール設定に基づいてローカライズされます。The default text for the property is localized based on the server's locale setting.

このプロパティの値は、設定されると、デザイナーツールを使用してリソースファイルに自動的に保存できます。The value of this property, when set, can be saved automatically to a resource file by using a designer tool. 詳細については、「」 LocalizableAttribute および「 グローバリゼーションとローカリゼーション」を参照してください。For more information, see LocalizableAttribute and Globalization and Localization.

適用対象

こちらもご覧ください