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 プロパティを設定します。 ユーザーが有効なユーザー名を入力しない場合、イベントで QuestionTitleTextAnswerLookupError プロパティがリセットされます。

<%@ 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 使用して Question ビューの外観を定義する場合、 QuestionTitleText プロパティは無効です。

プロパティの既定のテキストは、サーバーのロケール設定に基づいてローカライズされます。

このプロパティの値を設定すると、デザイナー ツールを使用してリソース ファイルに自動的に保存できます。 詳細については、「グローバリゼーションとローカライズ」を参照してくださいLocalizableAttribute

適用対象

こちらもご覧ください