ChangePassword.PasswordHintText プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ChangePassword.PasswordHintText プロパティの意味・解説 

ChangePassword.PasswordHintText プロパティ

メモ : このプロパティは、.NET Framework version 2.0 で新しく追加されたものです。

Web サイトのパスワードを作成するための要件に関する情報テキストを取得または設定します。

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

<LocalizableAttribute(True)> _
Public Overridable Property
 PasswordHintText As String
Dim instance As ChangePassword
Dim value As String

value = instance.PasswordHintText

instance.PasswordHintText = value
[LocalizableAttribute(true)] 
public virtual string PasswordHintText { get;
 set; }
[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 です。

解説解説
使用例使用例

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>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「ChangePassword.PasswordHintText プロパティ」の関連用語

ChangePassword.PasswordHintText プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ChangePassword.PasswordHintText プロパティのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS