HtmlHelperInputExtensions Class¶
Summary¶
Input-related extensions for [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) and [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1.yml).
Methods¶
-
CheckBox
(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper, System.String)¶ Returns an <input> element of type “checkbox” with value “true” and an <input> element of type “hidden” with value “false”.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) instance this method extends.
- expression (System.String) – Expression name, relative to the current model.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> elements.
public static HtmlString CheckBox(IHtmlHelper htmlHelper, string expression)
-
CheckBox
(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper, System.String, System.Boolean) Returns an <input> element of type “checkbox” with value “true” and an <input> element of type “hidden” with value “false”.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) instance this method extends.
- expression (System.String) – Expression name, relative to the current model.
- isChecked (System.Boolean) – If <c>true</c>, checkbox is initially checked.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> elements.
public static HtmlString CheckBox(IHtmlHelper htmlHelper, string expression, bool isChecked)
-
CheckBox
(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper, System.String, System.Object) Returns an <input> element of type “checkbox” with value “true” and an <input> element of type “hidden” with value “false”.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) instance this method extends.
- expression (System.String) – Expression name, relative to the current model.
- htmlAttributes (System.Object) – An [System.Object]() that contains the HTML attributes for the checkbox element. Alternatively, an [System.Collections.Generic.IDictionary`2]() instance containing the HTML attributes.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> elements.
public static HtmlString CheckBox(IHtmlHelper htmlHelper, string expression, object htmlAttributes)
-
Microsoft.AspNet.Mvc.Rendering.HtmlHelperInputExtensions.CheckBoxFor<TModel>(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel, System.Boolean>>)
Returns an <input> element of type “checkbox” with value “true” and an <input> element of type “hidden” with value “false”.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper{{TModel}}) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1.yml) instance this method extends.
- expression (System.Linq.Expressions.Expression{System.Func{{TModel},System.Boolean}}) – An expression to be evaluated against the current model.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> elements.
public static HtmlString CheckBoxFor<TModel>(IHtmlHelper<TModel> htmlHelper, Expression<Func<TModel, bool>> expression)
-
Hidden
(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper, System.String)¶ Returns an <input> element of type “hidden” for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) instance this method extends.
- expression (System.String) – Expression name, relative to the current model.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> element.
public static HtmlString Hidden(IHtmlHelper htmlHelper, string expression)
-
Hidden
(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper, System.String, System.Object) Returns an <input> element of type “hidden” for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) instance this method extends.
- expression (System.String) – Expression name, relative to the current model.
- value (System.Object) – If non- <c>null</c>, value to include in the element.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> element.
public static HtmlString Hidden(IHtmlHelper htmlHelper, string expression, object value)
-
Microsoft.AspNet.Mvc.Rendering.HtmlHelperInputExtensions.HiddenFor<TModel, TResult>(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel, TResult>>)
Returns an <input> element of type “hidden” for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper{{TModel}}) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1.yml) instance this method extends.
- expression (System.Linq.Expressions.Expression{System.Func{{TModel},{TResult}}}) – An expression to be evaluated against the current model.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> element.
public static HtmlString HiddenFor<TModel, TResult>(IHtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TResult>> expression)
-
Password
(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper, System.String)¶ Returns an <input> element of type “password” for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) instance this method extends.
- expression (System.String) – Expression name, relative to the current model.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> element.
public static HtmlString Password(IHtmlHelper htmlHelper, string expression)
-
Password
(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper, System.String, System.Object) Returns an <input> element of type “password” for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) instance this method extends.
- expression (System.String) – Expression name, relative to the current model.
- value (System.Object) – If non- <c>null</c>, value to include in the element.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> element.
public static HtmlString Password(IHtmlHelper htmlHelper, string expression, object value)
-
Microsoft.AspNet.Mvc.Rendering.HtmlHelperInputExtensions.PasswordFor<TModel, TResult>(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel, TResult>>)
Returns an <input> element of type “password” for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper{{TModel}}) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1.yml) instance this method extends.
- expression (System.Linq.Expressions.Expression{System.Func{{TModel},{TResult}}}) – An expression to be evaluated against the current model.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> element.
public static HtmlString PasswordFor<TModel, TResult>(IHtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TResult>> expression)
-
RadioButton
(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper, System.String, System.Object)¶ Returns an <input> element of type “radio” for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) instance this method extends.
- expression (System.String) – Expression name, relative to the current model.
- value (System.Object) – Value to include in the element. Must not be <c>null</c>.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> element.
public static HtmlString RadioButton(IHtmlHelper htmlHelper, string expression, object value)
-
RadioButton
(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper, System.String, System.Object, System.Boolean) Returns an <input> element of type “radio” for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) instance this method extends.
- expression (System.String) – Expression name, relative to the current model.
- value (System.Object) – If non- <c>null</c>, value to include in the element. Must not be <c>null</c> if <paramref name=”isChecked” /> is also <c>null</c>.
- isChecked (System.Boolean) – If <c>true</c>, radio button is initially selected. Must not be <c>null</c> if <paramref name=”value” /> is also <c>null</c>.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> element.
public static HtmlString RadioButton(IHtmlHelper htmlHelper, string expression, object value, bool isChecked)
-
RadioButton
(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper, System.String, System.Object, System.Object) Returns an <input> element of type “radio” for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) instance this method extends.
- expression (System.String) – Expression name, relative to the current model.
- value (System.Object) – If non- <c>null</c>, value to include in the element. Must not be <c>null</c> if no “checked” entry exists in <paramref name=”htmlAttributes” />.
- htmlAttributes (System.Object) – An [System.Object]() that contains the HTML attributes for the element. Alternatively, an [System.Collections.Generic.IDictionary`2]() instance containing the HTML attributes.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> element.
public static HtmlString RadioButton(IHtmlHelper htmlHelper, string expression, object value, object htmlAttributes)
-
Microsoft.AspNet.Mvc.Rendering.HtmlHelperInputExtensions.RadioButtonFor<TModel, TResult>(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel, TResult>>, System.Object)
Returns an <input> element of type “radio” for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper{{TModel}}) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1.yml) instance this method extends.
- expression (System.Linq.Expressions.Expression{System.Func{{TModel},{TResult}}}) – An expression to be evaluated against the current model.
- value (System.Object) – Value to include in the element. Must not be <c>null</c>.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> element.
public static HtmlString RadioButtonFor<TModel, TResult>(IHtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TResult>> expression, object value)
-
TextArea
(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper, System.String)¶ Returns a <textarea> element for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) instance this method extends.
- expression (System.String) – Expression name, relative to the current model.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <textarea> element.
public static HtmlString TextArea(IHtmlHelper htmlHelper, string expression)
-
TextArea
(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper, System.String, System.Object) Returns a <textarea> element for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) instance this method extends.
- expression (System.String) – Expression name, relative to the current model.
- htmlAttributes (System.Object) – An [System.Object]() that contains the HTML attributes for the element. Alternatively, an [System.Collections.Generic.IDictionary`2]() instance containing the HTML attributes.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <textarea> element.
public static HtmlString TextArea(IHtmlHelper htmlHelper, string expression, object htmlAttributes)
-
TextArea
(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper, System.String, System.String) Returns a <textarea> element for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) instance this method extends.
- expression (System.String) – Expression name, relative to the current model.
- value (System.String) – If non- <c>null</c>, value to include in the element.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <textarea> element.
public static HtmlString TextArea(IHtmlHelper htmlHelper, string expression, string value)
-
TextArea
(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper, System.String, System.String, System.Object) Returns a <textarea> element for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) instance this method extends.
- expression (System.String) – Expression name, relative to the current model.
- value (System.String) – If non- <c>null</c>, value to include in the element.
- htmlAttributes (System.Object) – An [System.Object]() that contains the HTML attributes for the element. Alternatively, an [System.Collections.Generic.IDictionary`2]() instance containing the HTML attributes.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <textarea> element.
public static HtmlString TextArea(IHtmlHelper htmlHelper, string expression, string value, object htmlAttributes)
-
Microsoft.AspNet.Mvc.Rendering.HtmlHelperInputExtensions.TextAreaFor<TModel, TResult>(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel, TResult>>)
Returns a <textarea> element for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper{{TModel}}) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1.yml) instance this method extends.
- expression (System.Linq.Expressions.Expression{System.Func{{TModel},{TResult}}}) – An expression to be evaluated against the current model.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <textarea> element.
public static HtmlString TextAreaFor<TModel, TResult>(IHtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TResult>> expression)
-
Microsoft.AspNet.Mvc.Rendering.HtmlHelperInputExtensions.TextAreaFor<TModel, TResult>(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel, TResult>>, System.Object)
Returns a <textarea> element for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper{{TModel}}) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1.yml) instance this method extends.
- expression (System.Linq.Expressions.Expression{System.Func{{TModel},{TResult}}}) – An expression to be evaluated against the current model.
- htmlAttributes (System.Object) – An [System.Object]() that contains the HTML attributes for the element. Alternatively, an [System.Collections.Generic.IDictionary`2]() instance containing the HTML attributes.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <textarea> element.
public static HtmlString TextAreaFor<TModel, TResult>(IHtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TResult>> expression, object htmlAttributes)
-
TextBox
(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper, System.String)¶ Returns an <input> element of type “text” for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) instance this method extends.
- expression (System.String) – Expression name, relative to the current model.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> element.
public static HtmlString TextBox(IHtmlHelper htmlHelper, string expression)
-
TextBox
(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper, System.String, System.Object) Returns an <input> element of type “text” for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) instance this method extends.
- expression (System.String) – Expression name, relative to the current model.
- value (System.Object) – If non- <c>null</c>, value to include in the element.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> element.
public static HtmlString TextBox(IHtmlHelper htmlHelper, string expression, object value)
-
TextBox
(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper, System.String, System.Object, System.Object) Returns an <input> element of type “text” for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) instance this method extends.
- expression (System.String) – Expression name, relative to the current model.
- value (System.Object) – If non- <c>null</c>, value to include in the element.
- htmlAttributes (System.Object) – An [System.Object]() that contains the HTML attributes for the element. Alternatively, an [System.Collections.Generic.IDictionary`2]() instance containing the HTML attributes.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> element.
public static HtmlString TextBox(IHtmlHelper htmlHelper, string expression, object value, object htmlAttributes)
-
TextBox
(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper, System.String, System.Object, System.String) Returns an <input> element of type “text” for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml) instance this method extends.
- expression (System.String) – Expression name, relative to the current model.
- value (System.Object) – If non- <c>null</c>, value to include in the element.
- format (System.String) – The composite format [System.String]() (see http://msdn.microsoft.com/en-us/library/txafckwd.aspx).
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> element.
public static HtmlString TextBox(IHtmlHelper htmlHelper, string expression, object value, string format)
-
Microsoft.AspNet.Mvc.Rendering.HtmlHelperInputExtensions.TextBoxFor<TModel, TResult>(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel, TResult>>)
Returns an <input> element of type “text” for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper{{TModel}}) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1.yml) instance this method extends.
- expression (System.Linq.Expressions.Expression{System.Func{{TModel},{TResult}}}) – An expression to be evaluated against the current model.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> element.
public static HtmlString TextBoxFor<TModel, TResult>(IHtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TResult>> expression)
-
Microsoft.AspNet.Mvc.Rendering.HtmlHelperInputExtensions.TextBoxFor<TModel, TResult>(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel, TResult>>, System.Object)
Returns an <input> element of type “text” for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper{{TModel}}) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1.yml) instance this method extends.
- expression (System.Linq.Expressions.Expression{System.Func{{TModel},{TResult}}}) – An expression to be evaluated against the current model.
- htmlAttributes (System.Object) – An [System.Object]() that contains the HTML attributes for the element. Alternatively, an [System.Collections.Generic.IDictionary`2]() instance containing the HTML attributes.
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> element.
public static HtmlString TextBoxFor<TModel, TResult>(IHtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TResult>> expression, object htmlAttributes)
-
Microsoft.AspNet.Mvc.Rendering.HtmlHelperInputExtensions.TextBoxFor<TModel, TResult>(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel, TResult>>, System.String)
Returns an <input> element of type “text” for the specified <paramref name=”expression” />.
Arguments: - htmlHelper (Microsoft.AspNet.Mvc.Rendering.IHtmlHelper{{TModel}}) – The [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper`1.yml) instance this method extends.
- expression (System.Linq.Expressions.Expression{System.Func{{TModel},{TResult}}}) – An expression to be evaluated against the current model.
- format (System.String) – The composite format [System.String]() (see http://msdn.microsoft.com/en-us/library/txafckwd.aspx).
Return type: Microsoft.AspNet.Mvc.Rendering.HtmlString
Returns: A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the <input> element.
public static HtmlString TextBoxFor<TModel, TResult>(IHtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TResult>> expression, string format)
-