Freigeben über


HtmlInputReset Server Control Declarative Syntax 

Creates a server-side control that maps to the input type="reset" HTML element and allows you to create a reset button control.

<input
    Type="reset"
    Disabled="Disabled"
    EnableViewState="False|True"
    ID="string"
    Visible="False|True"
    OnDataBinding="OnDataBinding event handler"
    OnDisposed="OnDisposed event handler"
    OnInit="OnInit event handler"
    OnLoad="OnLoad event handler"
    OnPreRender="OnPreRender event handler"
    OnServerChange="OnServerChange event handler"
    OnUnload="OnUnload event handler"
    runat="server" 

Remarks

The HtmlInputReset control is derived from the HtmlInputButton control and is used to create a button control on a Web page that resets form controls to their initial values. The HtmlInputReset control is often used with the HtmlInputSubmit control, which is used to create a button control that submits the form.

Example

The following code example demonstrates how to use the HtmlInputReset control declaratively with the HtmlInputSubmit, HtmlInputText, and HtmlInputPassword controls to submit a user name and password.

Username: <input id="Text1" type="text" runat="server" />
<br />
Password: <input id="Password1" type="password" runat="server" />
<br />
<input id="Submit1" type="submit" value="Submit" runat="server" />
<input id="Reset1" type="reset" value="Clear" runat="server" />
Username: <input id="Text1" type="text" runat="server" />
<br />
Password: <input id="Password1" type="password" runat="server" />
<br />
<input id="Submit1" type="submit" value="Submit" runat="server" />
<input id="Reset1" type="reset" value="Clear" runat="server" />

See Also

Reference

HtmlInputReset

Other Resources

HTML Server Controls