Class TextAreaExtensions
Represents support for HTML textarea controls.
public static class TextAreaExtensions
- Inheritance
-
TextAreaExtensions
- Inherited Members
Methods
TextArea(HtmlHelper, string)
Returns the specified textarea element by using the specified HTML helper and the name of the form field.
public static MvcHtmlString TextArea(this HtmlHelper htmlHelper, string name)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
namestringThe name of the form field to return.
Returns
- MvcHtmlString
The textarea element.
TextArea(HtmlHelper, string, IDictionary<string, object>)
Returns the specified textarea element by using the specified HTML helper, the name of the form field, and the specified HTML attributes.
public static MvcHtmlString TextArea(this HtmlHelper htmlHelper, string name, IDictionary<string, object> htmlAttributes)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
namestringThe name of the form field to return.
htmlAttributesIDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
The textarea element.
TextArea(HtmlHelper, string, object)
Returns the specified textarea element by using the specified HTML helper and HTML attributes.
public static MvcHtmlString TextArea(this HtmlHelper htmlHelper, string name, object htmlAttributes)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
namestringThe name of the form field to return.
htmlAttributesobjectAn object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
The textarea element.
TextArea(HtmlHelper, string, string)
Returns the specified textarea element by using the specified HTML helper, the name of the form field, and the text content.
public static MvcHtmlString TextArea(this HtmlHelper htmlHelper, string name, string value)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
namestringThe name of the form field to return.
valuestringThe text content.
Returns
- MvcHtmlString
The textarea element.
TextArea(HtmlHelper, string, string, IDictionary<string, object>)
Returns the specified textarea element by using the specified HTML helper, the name of the form field, the text content, and the specified HTML attributes.
public static MvcHtmlString TextArea(this HtmlHelper htmlHelper, string name, string value, IDictionary<string, object> htmlAttributes)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
namestringThe name of the form field to return.
valuestringThe text content.
htmlAttributesIDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
The textarea element.
TextArea(HtmlHelper, string, string, int, int, IDictionary<string, object>)
Returns the specified textarea element by using the specified HTML helper, the name of the form field, the text content, the number of rows and columns, and the specified HTML attributes.
public static MvcHtmlString TextArea(this HtmlHelper htmlHelper, string name, string value, int rows, int columns, IDictionary<string, object> htmlAttributes)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
namestringThe name of the form field to return.
valuestringThe text content.
rowsintThe number of rows.
columnsintThe number of columns.
htmlAttributesIDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
The textarea element.
TextArea(HtmlHelper, string, string, int, int, object)
Returns the specified textarea element by using the specified HTML helper, the name of the form field, the text content, the number of rows and columns, and the specified HTML attributes.
public static MvcHtmlString TextArea(this HtmlHelper htmlHelper, string name, string value, int rows, int columns, object htmlAttributes)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
namestringThe name of the form field to return.
valuestringThe text content.
rowsintThe number of rows.
columnsintThe number of columns.
htmlAttributesobjectAn object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
The textarea element.
TextArea(HtmlHelper, string, string, object)
Returns the specified textarea element by using the specified HTML helper, the name of the form field, the text content, and the specified HTML attributes.
public static MvcHtmlString TextArea(this HtmlHelper htmlHelper, string name, string value, object htmlAttributes)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
namestringThe name of the form field to return.
valuestringThe text content.
htmlAttributesobjectAn object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
The textarea element.
TextAreaFor<TModel, TProperty>(HtmlHelper<TModel>, Expression<Func<TModel, TProperty>>)
Returns an HTML textarea element for each property in the object that is represented by the specified expression.
public static MvcHtmlString TextAreaFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression)
Parameters
htmlHelperHtmlHelper<TModel>The HTML helper instance that this method extends.
expressionExpression<Func<TModel, TProperty>>An expression that identifies the object that contains the properties to render.
Returns
- MvcHtmlString
An HTML textarea element for each property in the object that is represented by the expression.
Type Parameters
TModelThe type of the model.
TPropertyThe type of the property.
Exceptions
- ArgumentNullException
The
expressionparameter is null.
TextAreaFor<TModel, TProperty>(HtmlHelper<TModel>, Expression<Func<TModel, TProperty>>, IDictionary<string, object>)
Returns an HTML textarea element for each property in the object that is represented by the specified expression using the specified HTML attributes.
public static MvcHtmlString TextAreaFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, IDictionary<string, object> htmlAttributes)
Parameters
htmlHelperHtmlHelper<TModel>The HTML helper instance that this method extends.
expressionExpression<Func<TModel, TProperty>>An expression that identifies the object that contains the properties to render.
htmlAttributesIDictionary<string, object>A dictionary that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An HTML textarea element for each property in the object that is represented by the expression.
Type Parameters
TModelThe type of the model.
TPropertyThe type of the property.
Exceptions
- ArgumentNullException
The
expressionparameter is null.
TextAreaFor<TModel, TProperty>(HtmlHelper<TModel>, Expression<Func<TModel, TProperty>>, int, int, IDictionary<string, object>)
Returns an HTML textarea element for each property in the object that is represented by the specified expression using the specified HTML attributes and the number of rows and columns.
public static MvcHtmlString TextAreaFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, int rows, int columns, IDictionary<string, object> htmlAttributes)
Parameters
htmlHelperHtmlHelper<TModel>The HTML helper instance that this method extends.
expressionExpression<Func<TModel, TProperty>>An expression that identifies the object that contains the properties to render.
rowsintThe number of rows.
columnsintThe number of columns.
htmlAttributesIDictionary<string, object>A dictionary that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An HTML textarea element for each property in the object that is represented by the expression.
Type Parameters
TModelThe type of the model.
TPropertyThe type of the property.
Exceptions
- ArgumentNullException
The
expressionparameter is null.
TextAreaFor<TModel, TProperty>(HtmlHelper<TModel>, Expression<Func<TModel, TProperty>>, int, int, object)
Returns an HTML textarea element for each property in the object that is represented by the specified expression using the specified HTML attributes and the number of rows and columns.
public static MvcHtmlString TextAreaFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, int rows, int columns, object htmlAttributes)
Parameters
htmlHelperHtmlHelper<TModel>The HTML helper instance that this method extends.
expressionExpression<Func<TModel, TProperty>>An expression that identifies the object that contains the properties to render.
rowsintThe number of rows.
columnsintThe number of columns.
htmlAttributesobjectA dictionary that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An HTML textarea element for each property in the object that is represented by the expression.
Type Parameters
TModelThe type of the model.
TPropertyThe type of the property.
Exceptions
- ArgumentNullException
The
expressionparameter is null.
TextAreaFor<TModel, TProperty>(HtmlHelper<TModel>, Expression<Func<TModel, TProperty>>, object)
Returns an HTML textarea element for each property in the object that is represented by the specified expression using the specified HTML attributes.
public static MvcHtmlString TextAreaFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, object htmlAttributes)
Parameters
htmlHelperHtmlHelper<TModel>The HTML helper instance that this method extends.
expressionExpression<Func<TModel, TProperty>>An expression that identifies the object that contains the properties to render.
htmlAttributesobjectA dictionary that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An HTML textarea element for each property in the object that is represented by the expression.
Type Parameters
TModelThe type of the model.
TPropertyThe type of the property.
Exceptions
- ArgumentNullException
The
expressionparameter is null.