ASP.NET HtmlTextAreaControl


HTML Server ControlsHTML Server Controls

Definition and Usage

The HtmlTextArea control is used to control the <textarea> element. In HTML, the <textarea> element is used to create a text area.


Attributes

Attribute Description
Attributes Returns the name and value pairs of all attributes of this element.
Cols The number of columns in the text area.
Disabled A Boolean value indicating whether the control is disabled. Default is false.
id The unique id of the control.
InnerHtml Sets or returns the content between the start and end tags of the HTML element. Special characters are not automatically converted to HTML entities.
InnerText Sets or returns all the text between the start and end tags of the HTML element. Special characters are automatically converted to HTML entities.
Name The unique name of the text area.
OnServerChange The name of the function to be executed when the content of the text area is modified.
Rows The number of visible rows in the text area.
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.
Value The value of the text area.
Visible A Boolean value indicating whether the control is visible.


Example

HTMLTextarea
In this example, we declare an HtmlTextarea 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 sends the message "You wrote: " and the text entered by the user in the text box to the p element.


HTML Server ControlsHTML Server Controls Other Extensions