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

Dim instance As ChangePassword Dim value As String value = instance.PasswordHintText instance.PasswordHintText = value
[LocalizableAttribute(true)] public: virtual property String^ PasswordHintText { String^ get (); void set (String^ value); }
/** @property */ public String get_PasswordHintText () /** @property */ public void set_PasswordHintText (String value)
public function get PasswordHintText () : String public function set PasswordHintText (value : String)
新しいパスワードの基準について表示する情報テキスト。既定値は Empty です。

PasswordHintText プロパティは、Web サイトのパスワードを作成するための要件に関する情報テキストを取得または設定します。このプロパティを使用して、NewPasswordRegularExpression プロパティで指定した新しいパスワードの要件を説明します。
このプロパティの値は、設定時に、デザイナ ツールを使用してリソース ファイルに自動的に保存できます。詳細については、「LocalizableAttribute」、「ASP.NET のグローバリゼーションおよびローカリゼーション」の各トピックを参照してください。

NewPasswordRegularExpression プロパティを設定して、以下の基準に一致するようにパスワードをチェックする正規表現を定義する方法を次のコード例に示します。
PasswordHintText プロパティに格納されたパスワード要件は、ユーザーに表示されます。
ユーザーの入力したパスワードが基準を満たしていない場合、NewPasswordRegularExpressionErrorMessage プロパティに格納されたテキストがユーザーに表示されます。新しいパスワードが入力されない場合、NewPasswordRequiredErrorMessage プロパティに格納されたテキストがユーザーに表示されます。
![]() |
---|
新しいパスワードは、MinRequiredPasswordLength、MinRequiredNonAlphanumericCharacters、および PasswordStrengthRegularExpression の各プロパティのメンバシップ プロバイダによって設定される最低限の条件を満たす必要もあります。パスワードがこれらの要件を満たしていない場合、ChangePasswordError イベントが発生します。 |
<%@ page language="VB"%> <script runat="server"> </script> <html> <head runat="server"> <title>Change Password with Validation</title> </head> <body> <form id="form1" runat="server"> <div> <asp:changepassword id="ChangePassword1" runat="server" PasswordHintText = "Please enter a password at least 7 characters long, containing a number and one special character." NewPasswordRegularExpression = '@\"(?=.{7,})(?=(.*\d){1,})(?=(.*\W){1,})' NewPasswordRegularExpressionErrorMessage = "Your password must be at least 7 characters long, and contain at least one number and one special character."> </asp:changepassword> </div> </form> </body> </html>
<%@ page language="C#"%> <script runat="server"> </script> <html> <head runat="server"> <title>Change Password with Validation</title> </head> <body> <form id="form1" runat="server"> <div> <asp:changepassword id="ChangePassword1" runat="server" PasswordHintText = "Please enter a password at least 7 characters long, containing a number and one special character." NewPasswordRegularExpression = '@\"(?=.{7,})(?=(.*\d){1,})(?=(.*\W){1,})' NewPasswordRegularExpressionErrorMessage = "Error: Your password must be at least 7 characters long, and contain at least one number and one special character." > </asp:changepassword> </div> </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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


ChangePassword クラス
ChangePassword メンバ
System.Web.UI.WebControls 名前空間
ChangePassword.NewPasswordRegularExpression プロパティ
ChangePassword.PasswordHintStyle プロパティ
PasswordLabelText
その他の技術情報
ASP.NET ログイン コントロールの概要
ASP.NET ログイン コントロールの外観のカスタマイズ
ASP.NET Web サーバー コントロール テンプレート
方法 : 匿名ユーザーおよびログイン ユーザーに異なる情報を表示する
Web サイト管理ツールの [セキュリティ] タブ
Weblioに収録されているすべての辞書からChangePassword.PasswordHintText プロパティを検索する場合は、下記のリンクをクリックしてください。

- ChangePassword.PasswordHintText プロパティのページへのリンク