ASP.NET HtmlInputButtonControl
HTML Server Controls
Definition and Usage
The HtmlInputButton control is used to control <input type="button">, <input type="submit"> and <input type="reset"> elements. In HTML, these elements are used to create command buttons, submit buttons, and reset buttons.
Attributes
| Attribute | Description |
|---|---|
| Attributes | Returns all attribute name and value pairs for this element. |
| Disabled | A Boolean value indicating whether the control is disabled. The default is false. |
| id | The unique id of the element. |
| Name | The name of the element. |
| OnServerClick | The name of the function to be executed when the button is clicked. |
| runat | Specifies that the control is a server control. Must be set to "server". |
| Style | Sets or returns the CSS properties applied to the control. |
| TagName | Returns the tag name of the element. |
| Type | The type of the element. |
| Value | The value of the element. |
| Visible | A Boolean value indicating whether the control is visible. |
Examples
HTMLInputbutton
In this example, we declare an HtmlInputText control, an HtmlInputButton control, and an HtmlGeneric control in a .aspx file (remember to nest the controls in an HtmlForm control). When the submit button is triggered, the submit subroutine is executed. This submit subroutine writes a welcome message to the p element.
HTML Server Controls Other Extensions