asp.net.ph

Skip Navigation LinksHome > ASP.NET Web Forms > Web Forms Server Controls > Controls You Can Use on Web Forms > ASP.NET HTML WebControls

ASP.NET HTML Controls

  Section Index


HtmlInputButton Server Control

Allows programmatic access to the HTML <input type=button>, <input type=submit>, and <input type=reset> elements on the server.

The HtmlInputButton control <input type=button ...runat="server"> renders a push button on an HTML form. The text to be displayed in the button is specified thru its Value attribute.

The HtmlInputButton control is similar in function to the HtmlButton control <button>, except that the latter can target any browser.

The following sample illustrates using the HtmlInputButton control.

Responding to an HtmlInputButton Control Event
Run Sample | View Source

Submit and Reset HtmlInputButtons

The HtmlInputButton control also supports the Reset and Submit button types, which are mainly used with forms accepting user input. Submit sends the form for processing, whereas Reset restores all of the entry fields in a form to their initial values.

The following sample illustrates using the Submit and Reset HtmlInputButton controls.

Submit and Reset HtmlInputButtons
Run Sample | View Source

Notice that the Reset button does not need a handler. HtmlInputButton controls automatically reset all entry fields to their previous state when the Reset button is clicked.

See Also

HtmlInputButton Control Syntax   Button Web Server Controls   HTML INPUT Element

More ...
Back to top


© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note