PasswordRecovery.QuestionLabelText プロパティ

定義

Question ボックスのラベル テキストを取得または設定します。

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

プロパティ値

Question ボックスのラベル。 既定値は、"質問:" です。

次のコード例では、QuestionLabelText プロパティを設定します。

<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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" 
      AnswerLabelText="Your answer:" 
      QuestionLabelText="Answer this question:" 
      UserNameLabelText="Your user name:">
      <LabelStyle 
        font-bold="True" 
        forecolor="White"
        backcolor="Navy">
      </LabelStyle>
    </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">
<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" 
      UserNameLabelText="Your user name:" 
      QuestionLabelText="Answer this question:" 
      AnswerLabelText="Your answer:">
      <LabelStyle 
        font-bold="True" 
        forecolor="White"
        backcolor="Navy">
      </LabelStyle>
    </asp:PasswordRecovery>
  </form>
</body>
</html>

注釈

プロパティには QuestionLabelText 、パスワード回復確認の質問テキスト ボックスのラベル テキストが含まれています。

プロパティに含まれるスタイル設定によって、 LabelStyle プロパティの外観が QuestionLabelText 定義されます。

プロパティを QuestionTemplate 使用して Question ビューの外観を定義する場合、 QuestionLabelText プロパティは無効です。

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

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

適用対象

こちらもご覧ください