PasswordRecovery.QuestionFailureText プロパティ

定義

パスワード回復用の確認質問に対するユーザーの解答が、Web サイトのデータ ストアに格納されている解答と一致しない場合に表示するテキストを取得または設定します。

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

プロパティ値

パスワード回復用の確認質問に対するユーザーの解答が、Web サイトのデータ ストアに格納されている解答と一致しない場合に表示するテキスト。 既定値は、"解答を確認できませんでした。 再試行してください。"

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

<%@ 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">
</script>
<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" 
            GeneralFailureText="You password cannot be retrieved at this time. Please try again later." 
            QuestionFailureText="Your answer does not match the stored answer. Please try again." 
            UserNameFailureText="We couldn't find that user name. Please try again.">
            <FailureTextStyle backcolor="Red" forecolor="White"></FailureTextStyle>
        </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">

    ' Insert page code here
    '

</script>
<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" 
            GeneralFailureText="You password cannot be retrieved at this time. Please try again later." 
            QuestionFailureText="Your answer does not match the stored answer. Please try again." 
            UserNameFailureText="We couldn't find that user name. Please try again.">
            <FailureTextStyle backcolor="Red" forecolor="White"></FailureTextStyle>
        </asp:PasswordRecovery>
        <!-- Insert content here -->
    </form>
</body>
</html>

注釈

プロパティには QuestionFailureText 、パスワード回復確認の質問に対する回答が Web サイト データ ストアに格納されている回答と一致しない場合に表示されるエラー メッセージが含まれます。

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

テンプレートを使用してコントロールの外観を PasswordRecovery 定義すると、 QuestionFailureText プロパティはオプション Literal のコントロールに表示され、 ID プロパティは "FailureText" に設定されます。

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

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

適用対象

こちらもご覧ください