HtmlInputPassword コンストラクタとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > HtmlInputPassword コンストラクタの意味・解説 

HtmlInputPassword コンストラクタ

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

既定値使用して HtmlInputPassword クラス新しインスタンス初期化します。

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

Dim instance As New HtmlInputPassword
public HtmlInputPassword ()
public:
HtmlInputPassword ()
public HtmlInputPassword ()
public function HtmlInputPassword ()
解説解説
使用例使用例

既定コンストラクタ使用して Web フォーム ページに HtmlInputText、HtmlInputPassword、および HtmlInputSubmit の各コントロールプログラムか追加し簡単なログイン画面作成する方法次のコード例示します

<%@ 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">

  Protected Sub Page_Load(ByVal
 sender As Object, ByVal
 e As EventArgs)
    
    If (IsPostBack) Then
      ' Add code to process the Login.
    End If

  End Sub

  Protected Sub Page_Init(ByVal
 sender As Object, ByVal
 e As System.EventArgs)
    
    Dim userText As HtmlInputText = New
 HtmlInputText
    userText.MaxLength = 20
    Placeholder1.Controls.Add(userText)

    Dim passwordText As HtmlInputPassword =
 New HtmlInputPassword
    passwordText.MaxLength = 20
    Placeholder2.Controls.Add(passwordText)

    Dim submitButton As HtmlInputSubmit = New
 HtmlInputSubmit
    submitButton.Value = "Submit"
    Placeholder3.Controls.Add(submitButton)

  End Sub
</script>

<html  >
  <body>
    <form id="Form1" runat="server">

      <table cellpadding="2">
        <tr>
        <td>User Name
            <asp:placeholder
                runat="server"
                id="Placeholder1" />
        </td></tr>
        <tr>
        <td>Password
            <asp:placeholder
                runat="server"
                id="Placeholder2" />
        </td></tr>
        <tr><td><asp:placeholder
                runat="server"
                id="Placeholder3" />
        </td></tr>
      </table>
    </form>
  </body>
</html>
<%@ 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">
  
  protected void page_load(object sender, EventArgs
 e)
  {
    if (IsPostBack)
    {
      // Add code to process the Login.
    }
  }

  protected void Page_Init(object sender, EventArgs
 e)
  {
    HtmlInputText userText = new HtmlInputText();
    userText.MaxLength = 20;
    Placeholder1.Controls.Add(userText);

    HtmlInputPassword passwordText = new HtmlInputPassword();
    passwordText.MaxLength = 20;
    Placeholder2.Controls.Add(passwordText);

    HtmlInputSubmit submitButton = new HtmlInputSubmit();
    submitButton.Value = "Submit";
    Placeholder3.Controls.Add(submitButton);
  }
</script>

<html  >
  <body>
    <form runat="server">

      <table cellpadding="2">
        <tr>
        <td>User Name
            <asp:placeholder
                runat="server"
                id="Placeholder1" />
        </td></tr>
        <tr>
        <td>Password
            <asp:placeholder
                runat="server"
                id="Placeholder2" />
        </td></tr>
        <tr><td><asp:placeholder
                runat="server"
                id="Placeholder3" />
        </td></tr>
      </table>
    </form>
  </body>
</html>
<%@ Page Language="VJ#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
  
  protected void Page_Load(Object sender, System.EventArgs
 e)
  {
    if (get_IsPostBack())
    {
      // Add code to process the Login.
    }

  }

  protected void Page_Init(Object sender, EventArgs
 e)
  {
    HtmlInputText userText = new HtmlInputText();
    userText.set_MaxLength(20);
    Placeholder1.get_Controls().Add(userText);

    HtmlInputPassword passwordText = new HtmlInputPassword();
    passwordText.set_MaxLength(20);
    Placeholder2.get_Controls().Add(passwordText);

    HtmlInputSubmit submitButton = new HtmlInputSubmit();
    submitButton.set_Value("Submit");
    Placeholder3.get_Controls().Add(submitButton);


  }
</script>

<html  >
  <body>
    <form runat="server">

      <table cellpadding="2">
        <tr>
        <td>User Name
            <asp:placeholder
                runat="server"
                id="Placeholder1" />
        </td></tr>
        <tr>
        <td>Password
            <asp:placeholder
                runat="server"
                id="Placeholder2" />
        </td></tr>
        <tr><td><asp:placeholder
                runat="server"
                id="Placeholder3" />
        </td></tr>
      </table>
    </form>
  </body>
</html>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からHtmlInputPassword コンストラクタを検索した結果を表示しています。
Weblioに収録されているすべての辞書からHtmlInputPassword コンストラクタを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からHtmlInputPassword コンストラクタ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「HtmlInputPassword コンストラクタ」の関連用語

HtmlInputPassword コンストラクタのお隣キーワード
検索ランキング

   

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



HtmlInputPassword コンストラクタのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS