ASP.NET HtmlInputButton control
Definition and usage
The HtmlInputButton control is used to control <input type="button">, <input type="submit">, and <input type="reset"> elements.
In HTML, this element is used to create buttons, submit buttons, and reset buttons.
Property
Property | Description |
---|---|
Attributes | Returns all attribute names and value pairs of the element. |
Disabled | Boolean value indicating whether the control is disabled. The default is false. |
id | The unique id of the control. |
Name | The name of the element. |
OnServerClick | The name of the function executed when the button is clicked. |
runat | Specifies that the control is a server control. It 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 | Boolean value indicating whether the control is visible. |
Example
- HTMLInputbutton
- In this example, we declare an HtmlInputText control, an HtmlInputButton control, and an HtmlGeneric control in the .aspx file. When the submit button is triggered, the submit subroutine is executed. This submit subroutine writes a welcome message to the p element.