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
htmlHelper
HtmlHelperThe HTML helper instance that this method extends.
name
stringThe 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
htmlHelper
HtmlHelperThe HTML helper instance that this method extends.
name
stringThe name of the form field to return.
htmlAttributes
IDictionary<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
htmlHelper
HtmlHelperThe HTML helper instance that this method extends.
name
stringThe name of the form field to return.
htmlAttributes
objectAn 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
htmlHelper
HtmlHelperThe HTML helper instance that this method extends.
name
stringThe name of the form field to return.
value
stringThe 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
htmlHelper
HtmlHelperThe HTML helper instance that this method extends.
name
stringThe name of the form field to return.
value
stringThe text content.
htmlAttributes
IDictionary<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
htmlHelper
HtmlHelperThe HTML helper instance that this method extends.
name
stringThe name of the form field to return.
value
stringThe text content.
rows
intThe number of rows.
columns
intThe number of columns.
htmlAttributes
IDictionary<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
htmlHelper
HtmlHelperThe HTML helper instance that this method extends.
name
stringThe name of the form field to return.
value
stringThe text content.
rows
intThe number of rows.
columns
intThe number of columns.
htmlAttributes
objectAn 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
htmlHelper
HtmlHelperThe HTML helper instance that this method extends.
name
stringThe name of the form field to return.
value
stringThe text content.
htmlAttributes
objectAn 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
htmlHelper
HtmlHelper<TModel>The HTML helper instance that this method extends.
expression
Expression<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
TModel
The type of the model.
TProperty
The type of the property.
Exceptions
- ArgumentNullException
The
expression
parameter 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
htmlHelper
HtmlHelper<TModel>The HTML helper instance that this method extends.
expression
Expression<Func<TModel, TProperty>>An expression that identifies the object that contains the properties to render.
htmlAttributes
IDictionary<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
TModel
The type of the model.
TProperty
The type of the property.
Exceptions
- ArgumentNullException
The
expression
parameter 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
htmlHelper
HtmlHelper<TModel>The HTML helper instance that this method extends.
expression
Expression<Func<TModel, TProperty>>An expression that identifies the object that contains the properties to render.
rows
intThe number of rows.
columns
intThe number of columns.
htmlAttributes
IDictionary<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
TModel
The type of the model.
TProperty
The type of the property.
Exceptions
- ArgumentNullException
The
expression
parameter 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
htmlHelper
HtmlHelper<TModel>The HTML helper instance that this method extends.
expression
Expression<Func<TModel, TProperty>>An expression that identifies the object that contains the properties to render.
rows
intThe number of rows.
columns
intThe number of columns.
htmlAttributes
objectA 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
TModel
The type of the model.
TProperty
The type of the property.
Exceptions
- ArgumentNullException
The
expression
parameter 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
htmlHelper
HtmlHelper<TModel>The HTML helper instance that this method extends.
expression
Expression<Func<TModel, TProperty>>An expression that identifies the object that contains the properties to render.
htmlAttributes
objectA 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
TModel
The type of the model.
TProperty
The type of the property.
Exceptions
- ArgumentNullException
The
expression
parameter is null.