InputExtensions.TextBoxFor Method

 

Returns a text input element for each property in the object that is represented by the specified expression.

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

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticTextBoxFor(Of TModel, TProperty)(HtmlHelper(Of TModel), Expression(Of Func(Of TModel, TProperty)))

Returns a text input element for each property in the object that is represented by the specified expression.

System_CAPS_pubmethodSystem_CAPS_staticTextBoxFor(Of TModel, TProperty)(HtmlHelper(Of TModel), Expression(Of Func(Of TModel, TProperty)), IDictionary(Of String, Object))

Returns a text input element for each property in the object that is represented by the specified expression, using the specified HTML attributes.

System_CAPS_pubmethodSystem_CAPS_staticTextBoxFor(Of TModel, TProperty)(HtmlHelper(Of TModel), Expression(Of Func(Of TModel, TProperty)), Object)

Returns a text input element for each property in the object that is represented by the specified expression, using the specified HTML attributes.

System_CAPS_pubmethodSystem_CAPS_staticTextBoxFor(Of TModel, TProperty)(HtmlHelper(Of TModel), Expression(Of Func(Of TModel, TProperty)), String)

Returns a text input element.

System_CAPS_pubmethodSystem_CAPS_staticTextBoxFor(Of TModel, TProperty)(HtmlHelper(Of TModel), Expression(Of Func(Of TModel, TProperty)), String, IDictionary(Of String, Object))

Returns a text input element.

System_CAPS_pubmethodSystem_CAPS_staticTextBoxFor(Of TModel, TProperty)(HtmlHelper(Of TModel), Expression(Of Func(Of TModel, TProperty)), String, Object)

Returns a text input element.

Return to top

InputExtensions.TextBoxFor(Of TModel, TProperty) Method (HtmlHelper(Of TModel), Expression(Of Func(Of TModel, TProperty)))

Returns a text input element for each property in the object that is represented by the specified expression.

<ExtensionAttribute>
Public Shared Function TextBoxFor(Of TModel, TProperty) (
	htmlHelper As HtmlHelper(Of TModel),
	expression As Expression(Of Func(Of TModel, TProperty))
) As MvcHtmlString

Parameters

htmlHelper
Type: System.Web.Mvc.HtmlHelper(Of TModel)

The HTML helper instance that this method extends.

expression
Type: System.Linq.Expressions.Expression(Of Func(Of TModelTProperty))

An expression that identifies the object that contains the properties to render.

Return Value

Type: System.Web.Mvc.MvcHtmlString

An HTML input element whose type attribute is set to "text" 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 value.

Exception Condition
ArgumentException

The expression parameter is null or empty.

Return to top

InputExtensions.TextBoxFor(Of TModel, TProperty) Method (HtmlHelper(Of TModel), Expression(Of Func(Of TModel, TProperty)), IDictionary(Of String, Object))

Returns a text input element for each property in the object that is represented by the specified expression, using the specified HTML attributes.

<ExtensionAttribute>
Public Shared Function TextBoxFor(Of TModel, TProperty) (
	htmlHelper As HtmlHelper(Of TModel),
	expression As Expression(Of Func(Of TModel, TProperty)),
	htmlAttributes As IDictionary(Of StringObject)
) As MvcHtmlString

Parameters

htmlHelper
Type: System.Web.Mvc.HtmlHelper(Of TModel)

The HTML helper instance that this method extends.

expression
Type: System.Linq.Expressions.Expression(Of Func(Of TModelTProperty))

An expression that identifies the object that contains the properties to render.

htmlAttributes
Type: System.Collections.Generic.IDictionary(Of StringObject)

A dictionary that contains the HTML attributes to set for the element.

Return Value

Type: System.Web.Mvc.MvcHtmlString

An HTML input element type attribute is set to "text" 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 value.

Exception Condition
ArgumentException

The expression parameter is null or empty.

Return to top

InputExtensions.TextBoxFor(Of TModel, TProperty) Method (HtmlHelper(Of TModel), Expression(Of Func(Of TModel, TProperty)), Object)

Returns a text input element for each property in the object that is represented by the specified expression, using the specified HTML attributes.

<ExtensionAttribute>
Public Shared Function TextBoxFor(Of TModel, TProperty) (
	htmlHelper As HtmlHelper(Of TModel),
	expression As Expression(Of Func(Of TModel, TProperty)),
	htmlAttributes As Object
) As MvcHtmlString

Parameters

htmlHelper
Type: System.Web.Mvc.HtmlHelper(Of TModel)

The HTML helper instance that this method extends.

expression
Type: System.Linq.Expressions.Expression(Of Func(Of TModelTProperty))

An expression that identifies the object that contains the properties to render.

htmlAttributes
Type: System.Object

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

Return Value

Type: System.Web.Mvc.MvcHtmlString

An HTML input element whose type attribute is set to "text" 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 value.

Exception Condition
ArgumentException

The expression parameter is null or empty.

Return to top

InputExtensions.TextBoxFor(Of TModel, TProperty) Method (HtmlHelper(Of TModel), Expression(Of Func(Of TModel, TProperty)), String)

Returns a text input element.

<ExtensionAttribute>
Public Shared Function TextBoxFor(Of TModel, TProperty) (
	htmlHelper As HtmlHelper(Of TModel),
	expression As Expression(Of Func(Of TModel, TProperty)),
	format As String
) As MvcHtmlString

Parameters

htmlHelper
Type: System.Web.Mvc.HtmlHelper(Of TModel)

The HTML helper instance that this method extends.

expression
Type: System.Linq.Expressions.Expression(Of Func(Of TModelTProperty))

An expression that identifies the object that contains the properties to display.

format
Type: System.String

A string that is used to format the input.

Return Value

Type: System.Web.Mvc.MvcHtmlString

An input element whose type attribute is set to "text".

Type Parameters

TModel

The type of the model.

TProperty

The type of the value.

Return to top

InputExtensions.TextBoxFor(Of TModel, TProperty) Method (HtmlHelper(Of TModel), Expression(Of Func(Of TModel, TProperty)), String, IDictionary(Of String, Object))

Returns a text input element.

<ExtensionAttribute>
Public Shared Function TextBoxFor(Of TModel, TProperty) (
	htmlHelper As HtmlHelper(Of TModel),
	expression As Expression(Of Func(Of TModel, TProperty)),
	format As String,
	htmlAttributes As IDictionary(Of StringObject)
) As MvcHtmlString

Parameters

htmlHelper
Type: System.Web.Mvc.HtmlHelper(Of TModel)

The HTML helper instance that this method extends.

expression
Type: System.Linq.Expressions.Expression(Of Func(Of TModelTProperty))

An expression that identifies the object that contains the properties to display.

format
Type: System.String

A string that is used to format the input.

htmlAttributes
Type: System.Collections.Generic.IDictionary(Of StringObject)

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

Return Value

Type: System.Web.Mvc.MvcHtmlString

An input element whose type attribute is set to "text".

Type Parameters

TModel

The type of the model.

TProperty

The type of the value.

Return to top

InputExtensions.TextBoxFor(Of TModel, TProperty) Method (HtmlHelper(Of TModel), Expression(Of Func(Of TModel, TProperty)), String, Object)

Returns a text input element.

<ExtensionAttribute>
Public Shared Function TextBoxFor(Of TModel, TProperty) (
	htmlHelper As HtmlHelper(Of TModel),
	expression As Expression(Of Func(Of TModel, TProperty)),
	format As String,
	htmlAttributes As Object
) As MvcHtmlString

Parameters

htmlHelper
Type: System.Web.Mvc.HtmlHelper(Of TModel)

The HTML helper instance that this method extends.

expression
Type: System.Linq.Expressions.Expression(Of Func(Of TModelTProperty))

An expression that identifies the object that contains the properties to display.

format
Type: System.String

A string that is used to format the input.

htmlAttributes
Type: System.Object

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

Return Value

Type: System.Web.Mvc.MvcHtmlString

An input element whose type attribute is set to "text".

Type Parameters

TModel

The type of the model.

TProperty

The type of the value.

Return to top
Show: