Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP.NET HtmlInputText Control

ASP.NET HtmlInputText Control


HTML Server Controls HTML Server Controls


Definition and Usage

The HtmlInputText control is used to control the and element. In HTML, these elements are used to create text fields and password fields.


property

property Description
Attributes Returns all attribute name and value pairs of the element.
Disabled A Boolean value that indicates whether the control is disabled. The default is false.
id The unique id of the element.
MaxLength The maximum number of characters allowed in the element.
Name The name of the element.
runat Specifies that this control is a server control. Must be set to "server".
Size The width of the element.
Style Sets or returns the CSS properties applied to this 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 that indicates whether the control is visible.

Example

HTMLInputText
In this example, we declare an HtmlInputText control, an HtmlInputButton control, and an HtmlGeneric control in the .aspx file (remember to nest the controls inside the 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 HTML Server Controls