ASP.NET HtmlInputText Controls
Definition and Usage
HtmlInputText control is used to control the <input type = "text"> and <input type = "password"> element. In HTML, these elements are used to create text fields and password fields.
Attributes
属性 | 描述 |
---|---|
Attributes | 返回该元素的所有属性名称和值对。 |
Disabled | 布尔值,指示是否禁用该控件。默认是 false。 |
id | 元素的唯一 id。 |
MaxLength | 该元素中可允许字符的最大数目。 |
Name | 元素的名称。 |
runat | 规定该控件是一个服务器控件。必须被设置为 "server"。 |
Size | 元素的宽度。 |
Style | 设置或返回被应用到该控件的 CSS 属性。 |
TagName | 返回元素的标签名。 |
Type | 元素的类型。 |
Value | 元素的值。 |
Visible | 布尔值,指示该控件是否可见。 |
Examples
HTMLInputText
In the present case, we declare a HtmlInputText control in an .aspx file, a HtmlInputButton control, and one HtmlGeneric control (remember to control nested HtmlForm control). When the submit button is triggered, the submit subroutine. The submit subroutine will write to the p elements of a welcome message.
HTML server controls