HtmlHelper.TextArea Method (String, IDictionary<String, Object>)
Returns an HTML multi-line text input (text area) control that has the specified name and custom attributes defined by an attribute dictionary.
Namespace: System.Web.WebPages.Html
Assembly: System.Web.WebPages (in System.Web.WebPages.dll)
Syntax
'Declaration
Public Function TextArea ( _
name As String, _
htmlAttributes As IDictionary(Of String, Object) _
) As IHtmlString
'Usage
Dim instance As HtmlHelper
Dim name As String
Dim htmlAttributes As IDictionary(Of String, Object)
Dim returnValue As IHtmlString
returnValue = instance.TextArea(name, _
htmlAttributes)
public IHtmlString TextArea(
string name,
IDictionary<string, Object> htmlAttributes
)
public:
IHtmlString^ TextArea(
String^ name,
IDictionary<String^, Object^>^ htmlAttributes
)
member TextArea :
name:string *
htmlAttributes:IDictionary<string, Object> -> IHtmlString
public function TextArea(
name : String,
htmlAttributes : IDictionary<String, Object>
) : IHtmlString
Parameters
- name
Type: System.String
The value to assign to the name attribute of the HTML textarea element.
- htmlAttributes
Type: System.Collections.Generic.IDictionary<String, Object>
The names and values of custom attributes for the element.
Return Value
Type: System.Web.IHtmlString
The HTML markup that represents the text area control.
Exceptions
Exception | Condition |
---|---|
ArgumentException | name is null reference (Nothing in Visual Basic) or empty. |
Remarks
The returned markup consists of an HTML textarea element in the following form:
<textarea name="name" rows="2" cols="20" ...htmlAttributes... />