Partager via


HtmlInputSubmit Server Control Declarative Syntax 

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

<input
    Type="submit"
    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 HtmlInputSubmit control is derived from the HtmlInputButton control and is used to create a button control on a Web page that submits a form. The HtmlInputSubmit control often is used with the HtmlInputReset control, which resets form controls to their initial values.

Example

The following code example demonstrates how to use the HtmlInputSubmit control declaratively with the HtmlInputReset, 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

HtmlInputSubmit

Other Resources

HTML Server Controls