TextAreaExtensions.TextArea Method

 

Returns the specified textarea element.

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

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticTextArea(HtmlHelper, String)

Returns the specified textarea element by using the specified HTML helper and the name of the form field.

System_CAPS_pubmethodSystem_CAPS_staticTextArea(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.

System_CAPS_pubmethodSystem_CAPS_staticTextArea(HtmlHelper, String, Object)

Returns the specified textarea element by using the specified HTML helper and HTML attributes.

System_CAPS_pubmethodSystem_CAPS_staticTextArea(HtmlHelper, String, String)

Returns the specified textarea element by using the specified HTML helper, the name of the form field, and the text content.

System_CAPS_pubmethodSystem_CAPS_staticTextArea(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.

System_CAPS_pubmethodSystem_CAPS_staticTextArea(HtmlHelper, String, String, Int32, Int32, 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.

System_CAPS_pubmethodSystem_CAPS_staticTextArea(HtmlHelper, String, String, Int32, Int32, 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.

System_CAPS_pubmethodSystem_CAPS_staticTextArea(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.

The difference between calling the TextArea method and using a textarea element is that the TextArea method is designed to make it easy to bind to view data or model data.

Return to top

TextAreaExtensions.TextArea Method (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
Type: System.Web.Mvc.HtmlHelper

The HTML helper instance that this method extends.

name
Type: System.String

The name of the form field to return.

Return Value

Type: System.Web.Mvc.MvcHtmlString

The textarea element.

The difference between calling the TextArea method and using a textarea element is that the TextArea method is designed to make it easy to bind to view data or model data.

Return to top

TextAreaExtensions.TextArea Method (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<stringobject> htmlAttributes
)

Parameters

htmlHelper
Type: System.Web.Mvc.HtmlHelper

The HTML helper instance that this method extends.

name
Type: System.String

The name of the form field to return.

htmlAttributes
Type: System.Collections.Generic.IDictionary<StringObject>

An object that contains the HTML attributes to set for the element.

Return Value

Type: System.Web.Mvc.MvcHtmlString

The textarea element.

The difference between calling the TextArea method and using a textarea element is that the TextArea method is designed to make it easy to bind to view data or model data.

The htmlAttributes parameter consists of an object that contains name/value pairs. The attributes that are specified in the name/value pairs depend on the HTML element that is being rendered. For example, for a textarea element, you might provide the following anonymous object:

new {id = "textarea1", cols="20", rows="5", wrap="virtual"}
Return to top

TextAreaExtensions.TextArea Method (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
Type: System.Web.Mvc.HtmlHelper

The HTML helper instance that this method extends.

name
Type: System.String

The name of the form field to return.

htmlAttributes
Type: System.Object

An object that contains the HTML attributes to set for the element.

Return Value

Type: System.Web.Mvc.MvcHtmlString

The textarea element.

The difference between calling the TextArea method and using a textarea element is that the TextArea method is designed to make it easy to bind to view data or model data.

The htmlAttributes parameter consists of an object that contains name/value pairs. The attributes that are specified in the name/value pairs depend on the HTML element that is being rendered. For example, for a textarea element, you might provide the following anonymous object:

new {id = "textarea1", cols="20", rows="5", wrap="virtual"}
Return to top

TextAreaExtensions.TextArea Method (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
Type: System.Web.Mvc.HtmlHelper

The HTML helper instance that this method extends.

name
Type: System.String

The name of the form field to return.

value
Type: System.String

The text content.

Return Value

Type: System.Web.Mvc.MvcHtmlString

The textarea element.

The difference between calling the TextArea method and using a textarea element is that the TextArea method is designed to make it easy to bind to view data or model data.

Return to top

TextAreaExtensions.TextArea Method (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<stringobject> htmlAttributes
)

Parameters

htmlHelper
Type: System.Web.Mvc.HtmlHelper

The HTML helper instance that this method extends.

name
Type: System.String

The name of the form field to return.

value
Type: System.String

The text content.

htmlAttributes
Type: System.Collections.Generic.IDictionary<StringObject>

An object that contains the HTML attributes to set for the element.

Return Value

Type: System.Web.Mvc.MvcHtmlString

The textarea element.

The difference between calling the TextArea method and using a textarea element is that the TextArea method is designed to make it easy to bind to view data or model data.

The htmlAttributes parameter consists of an object that contains name/value pairs. The attributes that are specified in the name/value pairs depend on the HTML element that is being rendered. For example, for a textarea element, you might provide the following anonymous object:

new {id = "textarea1", cols="20", rows="5", wrap="virtual"}
Return to top

TextAreaExtensions.TextArea Method (HtmlHelper, String, String, Int32, Int32, 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<stringobject> htmlAttributes
)

Parameters

htmlHelper
Type: System.Web.Mvc.HtmlHelper

The HTML helper instance that this method extends.

name
Type: System.String

The name of the form field to return.

value
Type: System.String

The text content.

rows
Type: System.Int32

The number of rows.

columns
Type: System.Int32

The number of columns.

htmlAttributes
Type: System.Collections.Generic.IDictionary<StringObject>

An object that contains the HTML attributes to set for the element.

Return Value

Type: System.Web.Mvc.MvcHtmlString

The textarea element.

The difference between calling the TextArea method and using a textarea element is that the TextArea method is designed to make it easy to bind to view data or model data.

The htmlAttributes parameter consists of an object that contains name/value pairs. The attributes that are specified in the name/value pairs depend on the HTML element that is being rendered. For example, for a textarea element, you might provide the following anonymous object:

new {id = "textarea1", cols="20", rows="5", wrap="virtual"}
Return to top

TextAreaExtensions.TextArea Method (HtmlHelper, String, String, Int32, Int32, 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
Type: System.Web.Mvc.HtmlHelper

The HTML helper instance that this method extends.

name
Type: System.String

The name of the form field to return.

value
Type: System.String

The text content.

rows
Type: System.Int32

The number of rows.

columns
Type: System.Int32

The number of columns.

htmlAttributes
Type: System.Object

An object that contains the HTML attributes to set for the element.

Return Value

Type: System.Web.Mvc.MvcHtmlString

The textarea element.

The difference between calling the TextArea method and using a textarea element is that the TextArea method is designed to make it easy to bind to view data or model data.

The htmlAttributes parameter consists of an object that contains name/value pairs. The attributes that are specified in the name/value pairs depend on the HTML element that is being rendered. For example, for a textarea element, you might provide the following anonymous object:

new {id = "textarea1", cols="20", rows="5", wrap="virtual"}
Return to top

TextAreaExtensions.TextArea Method (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
Type: System.Web.Mvc.HtmlHelper

The HTML helper instance that this method extends.

name
Type: System.String

The name of the form field to return.

value
Type: System.String

The text content.

htmlAttributes
Type: System.Object

An object that contains the HTML attributes to set for the element.

Return Value

Type: System.Web.Mvc.MvcHtmlString

The textarea element.

The difference between calling the TextArea method and using a textarea element is that the TextArea method is designed to make it easy to bind to view data or model data.

The htmlAttributes parameter consists of an object that contains name/value pairs. The attributes that are specified in the name/value pairs depend on the HTML element that is being rendered. For example, for a textarea element, you might provide the following anonymous object:

new {id = "textarea1", cols="20", rows="5", wrap="virtual"}
Return to top
Show: