IHtmlHelper<TModel>.TextAreaFor<TResult> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a <textarea> element for the specified expression
. Adds content to the
element body based on the first non-null
value found in:
the ModelState entry with full name, or
the expression
evaluated against Model.
See NameFor<TResult>(Expression<Func<TModel,TResult>>) for more information about a "full name".
public:
generic <typename TResult>
Microsoft::AspNetCore::Html::IHtmlContent ^ TextAreaFor(System::Linq::Expressions::Expression<Func<TModel, TResult> ^> ^ expression, int rows, int columns, System::Object ^ htmlAttributes);
public Microsoft.AspNetCore.Html.IHtmlContent TextAreaFor<TResult> (System.Linq.Expressions.Expression<Func<TModel,TResult>> expression, int rows, int columns, object htmlAttributes);
abstract member TextAreaFor : System.Linq.Expressions.Expression<Func<'Model, 'Result>> * int * int * obj -> Microsoft.AspNetCore.Html.IHtmlContent
Public Function TextAreaFor(Of TResult) (expression As Expression(Of Func(Of TModel, TResult)), rows As Integer, columns As Integer, htmlAttributes As Object) As IHtmlContent
Type Parameters
- TResult
The type of the expression
result.
Parameters
- expression
- Expression<Func<TModel,TResult>>
An expression to be evaluated against the current model.
- rows
- Int32
Number of rows in the textarea.
- columns
- Int32
Number of columns in the textarea.
- htmlAttributes
- Object
An Object that contains the HTML attributes for the element. Alternatively, an IDictionary<TKey,TValue> instance containing the HTML attributes.
Returns
A new IHtmlContent containing the <textarea> element.
Remarks
Combines HtmlFieldPrefix and the string representation of the expression
to set <textarea> element's "name" attribute. Sanitizes the string representation of the expression
to set element's "id" attribute.