HtmlInputReset イベント

名前 | 説明 | |
---|---|---|
![]() | DataBinding | サーバー コントロールがデータ ソースに連結すると発生します。 ( Control から継承されます。) |
![]() | Disposed | サーバー コントロールがメモリから解放されると発生します。これは、ASP.NET ページが要求されている場合のサーバー コントロールの有効期間における最終段階です。 ( Control から継承されます。) |
![]() | Init | サーバー コントロールが初期化されると発生します。これは、サーバー コントロールの有効期間における最初の手順です。 ( Control から継承されます。) |
![]() | Load | サーバー コントロールが Page オブジェクトに読み込まれると発生します。 ( Control から継承されます。) |
![]() | PreRender | Control オブジェクトの読み込み後、表示を開始する前に発生します。 ( Control から継承されます。) |
![]() | ServerClick | Web ページで HtmlInputReset コントロールがクリックされたときに発生します。 |
![]() | Unload | サーバー コントロールがメモリからアンロードされると発生します。 ( Control から継承されます。) |

関連項目
HtmlInputReset クラスSystem.Web.UI.HtmlControls 名前空間
HtmlInputButton クラス
HtmlInputSubmit
その他の技術情報
HTML サーバー コントロールHtmlInputReset クラス
アセンブリ: System.Web (system.web.dll 内)


HtmlInputReset クラスは、HtmlInputButton クラスから派生しており、フォーム コントロールを初期値にリセットするボタン コントロールを Web ページ上に作成する場合に使用します。HtmlInputReset コントロールは、多くの場合、フォームを送信するボタン コントロールの作成に使用する HtmlInputSubmit コントロールと共に使用されます。
HtmlInputReset のインスタンスの初期プロパティ値の一覧については、HtmlInputReset コンストラクタのトピックを参照してください。

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>


System.Web.UI.Control
System.Web.UI.HtmlControls.HtmlControl
System.Web.UI.HtmlControls.HtmlInputControl
System.Web.UI.HtmlControls.HtmlInputButton
System.Web.UI.HtmlControls.HtmlInputReset


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


HtmlInputReset コンストラクタ ()
アセンブリ: System.Web (system.web.dll 内)



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>

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


HtmlInputReset コンストラクタ (String)
アセンブリ: System.Web (system.web.dll 内)


HtmlInputReset のインスタンスの初期プロパティ値を次の表に示します。
type パラメータを有効な HTML <input> 要素として認識されていない値に設定した場合、既定の HTML <input> 要素は単一行のテキスト入力フィールドになります。

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>

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


HtmlInputReset コンストラクタ

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

HtmlInputReset プロパティ



関連項目
HtmlInputReset クラスSystem.Web.UI.HtmlControls 名前空間
HtmlInputButton クラス
HtmlInputSubmit
その他の技術情報
HTML サーバー コントロールHtmlInputReset メソッド



関連項目
HtmlInputReset クラスSystem.Web.UI.HtmlControls 名前空間
HtmlInputButton クラス
HtmlInputSubmit
その他の技術情報
HTML サーバー コントロールHtmlInputReset メンバ
サーバーの HTML <input type=reset> 要素へのプログラムによるアクセスを許可します。
HtmlInputReset データ型で公開されるメンバを以下の表に示します。






名前 | 説明 | |
---|---|---|
![]() | DataBinding | サーバー コントロールがデータ ソースに連結すると発生します。(Control から継承されます。) |
![]() | Disposed | サーバー コントロールがメモリから解放されると発生します。これは、ASP.NET ページが要求されている場合のサーバー コントロールの有効期間における最終段階です。(Control から継承されます。) |
![]() | Init | サーバー コントロールが初期化されると発生します。これは、サーバー コントロールの有効期間における最初の手順です。(Control から継承されます。) |
![]() | Load | サーバー コントロールが Page オブジェクトに読み込まれると発生します。(Control から継承されます。) |
![]() | PreRender | Control オブジェクトの読み込み後、表示を開始する前に発生します。(Control から継承されます。) |
![]() | ServerClick | Web ページで HtmlInputReset コントロールがクリックされたときに発生します。 |
![]() | Unload | サーバー コントロールがメモリからアンロードされると発生します。(Control から継承されます。) |

関連項目
HtmlInputReset クラスSystem.Web.UI.HtmlControls 名前空間
HtmlInputButton クラス
HtmlInputSubmit
その他の技術情報
HTML サーバー コントロール- HtmlInputResetのページへのリンク