HtmlHelper.TextArea Method (String, String, Int32, Int32, Object)

Returns an HTML multi-line text input (text area) control that has the specified name, value, row attribute, col attribute, and custom attributes defined by an attribute object.

Namespace:  System.Web.WebPages.Html
Assembly:  System.Web.WebPages (in System.Web.WebPages.dll)


Public Function TextArea ( _
    name As String, _
    value As String, _
    rows As Integer, _
    columns As Integer, _
    htmlAttributes As Object _
) As IHtmlString
Dim instance As HtmlHelper 
Dim name As String 
Dim value As String 
Dim rows As Integer 
Dim columns As Integer 
Dim htmlAttributes As Object 
Dim returnValue As IHtmlString 

returnValue = instance.TextArea(name, _
    value, rows, columns, htmlAttributes)
public IHtmlString TextArea(
    string name,
    string value,
    int rows,
    int columns,
    Object htmlAttributes
IHtmlString^ TextArea(
    String^ name, 
    String^ value, 
    int rows, 
    int columns, 
    Object^ htmlAttributes
member TextArea : 
        name:string * 
        value:string * 
        rows:int * 
        columns:int * 
        htmlAttributes:Object -> IHtmlString
public function TextArea(
    name : String, 
    value : String, 
    rows : int, 
    columns : int, 
    htmlAttributes : Object
) : IHtmlString


  • name
    Type: System.String
    The value to assign to the name attribute of the HTML textarea element.
  • rows
    Type: System.Int32
    The value to assign to the rows attribute of the element.
  • columns
    Type: System.Int32
    The value to assign to the cols attribute of the element.
  • htmlAttributes
    Type: System.Object
    An object that contains custom attributes for the element. The attribute names and values are retrieved through reflection by examining the properties of the object.

Return Value

Type: System.Web.IHtmlString
The HTML markup that represents the text area control.


Exception Condition

name is null reference (Nothing in Visual Basic) or empty.


The returned markup consists of an HTML textarea element in the following form:

<textarea name="name" rows="rows" cols="columns" ...htmlAttributes...>

See Also


HtmlHelper Class

TextArea Overload

System.Web.WebPages.Html Namespace