HtmlInputReset クラスとは? わかりやすく解説

HtmlInputReset クラス

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

サーバーHTML <input type=reset> 要素へのプログラムによるアクセス許可します

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

Public Class HtmlInputReset
    Inherits HtmlInputButton
Dim instance As HtmlInputReset
public class HtmlInputReset : HtmlInputButton
public ref class HtmlInputReset : public
 HtmlInputButton
public class HtmlInputReset extends HtmlInputButton
public class HtmlInputReset extends
 HtmlInputButton
解説解説
使用例使用例

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>

.NET Framework のセキュリティ.NET Frameworkセキュリティ
継承階層継承階層
System.Object
   System.Web.UI.Control
     System.Web.UI.HtmlControls.HtmlControl
       System.Web.UI.HtmlControls.HtmlInputControl
         System.Web.UI.HtmlControls.HtmlInputButton
          System.Web.UI.HtmlControls.HtmlInputReset
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
HtmlInputReset メンバ
System.Web.UI.HtmlControls 名前空間
HtmlInputButton クラス
HtmlInputSubmit
その他の技術情報
HTML サーバー コントロール



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

辞書ショートカット

すべての辞書の索引

「HtmlInputReset クラス」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS