PasswordRecovery.InstructionTextStyle プロパティ
アセンブリ: System.Web (system.web.dll 内)

説明テキストの外観を定義するプロパティを格納している TableItemStyle への参照。

InstructionTextStyle プロパティは、PasswordRecovery コントロールの説明テキストの外観を定義します。このプロパティは読み取り専用です。ただし、このプロパティが返す Style オブジェクトのプロパティを設定することはできます。このプロパティは、Property-Subproperty の形式で、宣言によって設定できます。ここで、Subproperty は Style クラスのプロパティを表します (例 : InstructionTextStyle-ForeColor)。Property.Subproperty の形式でプロパティをプログラムによって設定することもできます (例 : InstructionTextStyle.ForeColor)。
共通設定には、カスタムの背景色、テキストの色、およびフォントのプロパティが含まれます。InstructionTextStyle プロパティは、次のプロパティの外観を定義します。
-
QuestionInstructionText
-
UserNameInstructionText
InstructionTextStyle プロパティのスタイル設定は、PasswordRecovery コントロールのスタイル設定とマージされます。InstructionTextStyle プロパティで行われた設定は、PasswordRecovery コントロールのプロパティの対応する設定をオーバーライドします。
PasswordRecovery コントロールの次のプロパティは、InstructionTextStyle プロパティによってオーバーライドされます。
テンプレートを使用して、PasswordRecovery コントロールのユーザー名ビューまたは質問ビューの外観を定義した場合、InstructionTextStyle プロパティは無効になります。

InstructionTextStyle プロパティの設定方法を次のコード例に示します。
<%@ page language="VB" %> <script runat="server"> 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 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 </script> <html> <body> <form 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="C#" %> <script runat="server"> void PasswordRecovery1_UserLookupError(object sender, EventArgs e) { PasswordRecovery1.UserNameInstructionText = "Enter the correct Web site user name."; PasswordRecovery1.InstructionTextStyle.ForeColor = System.Drawing.Color.Red; } void PasswordRecovery1_AnswerLookupError(object sender, EventArgs e) { PasswordRecovery1.QuestionInstructionText = "Enter the correct answer to this question."; PasswordRecovery1.InstructionTextStyle.ForeColor = System.Drawing.Color.Red; } </script> <html> <body> <form 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>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からPasswordRecovery.InstructionTextStyle プロパティを検索する場合は、下記のリンクをクリックしてください。

- PasswordRecovery.InstructionTextStyle プロパティのページへのリンク