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

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

HtmlInputReset コンストラクタ (String)

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

入力の型を指定して、HtmlInputReset クラス新しインスタンス初期化します。

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

public HtmlInputReset (
    string type
)
public:
HtmlInputReset (
    String^ type
)
public HtmlInputReset (
    String type
)
public function HtmlInputReset (
    type : String
)

パラメータ

type

入力の型。

解説解説
使用例使用例

HtmlInputReset コントロール使用してWeb ページフォームの値をリセットする方法次のコード例示します

<%@ Page Language="VB" %>


<script runat="server">

  Protected Sub Page_Load(ByVal
 sender As Object, ByVal
 e As System.EventArgs)

    ' Define an HtmlInputReset button using the default constructor.
    Dim reset1 As New HtmlInputReset()
    reset1.ID = "ResetButton1"
    reset1.Value = "Reset 1"
       
    ' Define an HtmlInputReset button as type "reset".
    Dim reset2 As New HtmlInputReset("reset")
    reset2.ID = "ResetButton2"
    reset2.Value = "Reset 2"

    ' Define an HtmlInputReset button as custom type "custom".
    ' This is not a valid HTML input type so a standared input
    ' field will be displayed.
    Dim reset3 As New HtmlInputReset("custom")
    reset3.ID = "ResetButton3"
    reset3.Value = "Reset 3"
       
    ' Clear the PlaceHolder control and add the Reset buttons to it.
    PlaceHolder.Controls.Clear()
    PlaceHolder.Controls.Add(reset1)
    PlaceHolder.Controls.Add(New LiteralControl("<br>"))
    PlaceHolder.Controls.Add(reset2)
    PlaceHolder.Controls.Add(New LiteralControl("<br>"))
    PlaceHolder.Controls.Add(reset3)
    
  End Sub
  
</script>

<html>

<head>

  <title>HtmlInputReset Example</title>

</head>

<body>
    <form runat="server">

      <h3> HtmlInputReset Example </h3>

      <asp:PlaceHolder id="PlaceHolder"
                       runat="server">
      </asp:PlaceHolder>
      
      <br />

      Change the text in the input field and
 then click 
      "Reset 1" or "Reset
 2" to change it back to its initial
      value.

    </form>
</body>

</html>
<%@ Page Language="C#" %>

 <script runat="server">

     protected void Page_Load(object sender,
 EventArgs e)
     {
       // Define an HtmlInputReset button using the default constructor.
       HtmlInputReset reset1 = new HtmlInputReset();
       reset1.ID = "ResetButton1";
       reset1.Value = "Reset 1";
       
       // Define an HtmlInputReset button as type "reset".
       HtmlInputReset reset2 = new HtmlInputReset("reset");
       reset2.ID = "ResetButton2";
       reset2.Value = "Reset 2";

       // Define an HtmlInputReset button as custom type "custom".
       // This is not a valid HTML input type so a standared input
       // field will be displayed.
       HtmlInputReset reset3 = new HtmlInputReset("custom");
       reset3.ID = "ResetButton3";
       reset3.Value = "Reset 3";
       
       // Clear the PlaceHolder control and add the Reset buttons to
 it.
       PlaceHolder.Controls.Clear();
       PlaceHolder.Controls.Add(reset1);
       PlaceHolder.Controls.Add(new LiteralControl("<br>"));
       PlaceHolder.Controls.Add(reset2);
       PlaceHolder.Controls.Add(new LiteralControl("<br>"));
       PlaceHolder.Controls.Add(reset3);
       
     }
</script>

<html> 

<head>

  <title>HtmlInputReset Example</title>

</head>

<body>

   <form runat="server">

      <h3> HtmlInputReset Example </h3>

      <asp:PlaceHolder id="PlaceHolder"
                       runat="server">
      </asp:PlaceHolder>
      
      <br />

      Change the text in the input field and then click 
      "Reset 1" or "Reset 2" to change it back to its initial
      value.

   </form>

</body>

</html>

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
HtmlInputReset クラス
HtmlInputReset メンバ
System.Web.UI.HtmlControls 名前空間

HtmlInputReset コンストラクタ

HtmlInputReset クラス新しインスタンス初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
HtmlInputReset () 既定値使用して HtmlInputReset クラス新しインスタンス初期化します。
HtmlInputReset (String) 入力の型を指定してHtmlInputReset クラス新しインスタンス初期化します。
参照参照

関連項目

HtmlInputReset クラス
HtmlInputReset メンバ
System.Web.UI.HtmlControls 名前空間

HtmlInputReset コンストラクタ ()

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

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

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

Dim instance As New HtmlInputReset
public HtmlInputReset ()
public:
HtmlInputReset ()
public HtmlInputReset ()
public function HtmlInputReset ()
解説解説

HtmlInputResetインスタンス初期プロパティ値を次の表に示します

プロパティ

HtmlControl.TagName

"reset" リテラル文字列

使用例使用例

HtmlInputReset コントロール使用してWeb ページフォームの値をリセットする方法次のコード例示します

<%@ Page Language="VB" %>


<script runat="server">

  Protected Sub Page_Load(ByVal
 sender As Object, ByVal
 e As System.EventArgs)

    ' Define an HtmlInputReset button using the default constructor.
    Dim reset1 As New HtmlInputReset()
    reset1.ID = "ResetButton1"
    reset1.Value = "Reset 1"
       
    ' Define an HtmlInputReset button as type "reset".
    Dim reset2 As New HtmlInputReset("reset")
    reset2.ID = "ResetButton2"
    reset2.Value = "Reset 2"

    ' Define an HtmlInputReset button as custom type "custom".
    ' This is not a valid HTML input type so a standared input
    ' field will be displayed.
    Dim reset3 As New HtmlInputReset("custom")
    reset3.ID = "ResetButton3"
    reset3.Value = "Reset 3"
       
    ' Clear the PlaceHolder control and add the Reset buttons to it.
    PlaceHolder.Controls.Clear()
    PlaceHolder.Controls.Add(reset1)
    PlaceHolder.Controls.Add(New LiteralControl("<br>"))
    PlaceHolder.Controls.Add(reset2)
    PlaceHolder.Controls.Add(New LiteralControl("<br>"))
    PlaceHolder.Controls.Add(reset3)
    
  End Sub
  
</script>

<html>

<head>

  <title>HtmlInputReset Example</title>

</head>

<body>
    <form runat="server">

      <h3> HtmlInputReset Example </h3>

      <asp:PlaceHolder id="PlaceHolder"
                       runat="server">
      </asp:PlaceHolder>
      
      <br />

      Change the text in the input field and
 then click 
      "Reset 1" or "Reset
 2" to change it back to its initial
      value.

    </form>
</body>

</html>
<%@ Page Language="C#" %>

 <script runat="server">

     protected void Page_Load(object sender,
 EventArgs e)
     {
       // Define an HtmlInputReset button using the default constructor.
       HtmlInputReset reset1 = new HtmlInputReset();
       reset1.ID = "ResetButton1";
       reset1.Value = "Reset 1";
       
       // Define an HtmlInputReset button as type "reset".
       HtmlInputReset reset2 = new HtmlInputReset("reset");
       reset2.ID = "ResetButton2";
       reset2.Value = "Reset 2";

       // Define an HtmlInputReset button as custom type "custom".
       // This is not a valid HTML input type so a standared input
       // field will be displayed.
       HtmlInputReset reset3 = new HtmlInputReset("custom");
       reset3.ID = "ResetButton3";
       reset3.Value = "Reset 3";
       
       // Clear the PlaceHolder control and add the Reset buttons to
 it.
       PlaceHolder.Controls.Clear();
       PlaceHolder.Controls.Add(reset1);
       PlaceHolder.Controls.Add(new LiteralControl("<br>"));
       PlaceHolder.Controls.Add(reset2);
       PlaceHolder.Controls.Add(new LiteralControl("<br>"));
       PlaceHolder.Controls.Add(reset3);
       
     }
</script>

<html> 

<head>

  <title>HtmlInputReset Example</title>

</head>

<body>

   <form runat="server">

      <h3> HtmlInputReset Example </h3>

      <asp:PlaceHolder id="PlaceHolder"
                       runat="server">
      </asp:PlaceHolder>
      
      <br />

      Change the text in the input field and then click 
      "Reset 1" or "Reset 2" to change it back to its initial
      value.

   </form>

</body>

</html>

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
HtmlInputReset クラス
HtmlInputReset メンバ
System.Web.UI.HtmlControls 名前空間



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

辞書ショートカット

すべての辞書の索引

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

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

   

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



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

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

©2025 GRAS Group, Inc.RSS