HtmlHelperInputExtensions Class¶
Input-related extensions for Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
and Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper`1
.
- Namespace
Microsoft.AspNetCore.Mvc.Rendering
- Assemblies
- Microsoft.AspNetCore.Mvc.ViewFeatures
Syntax¶
public class HtmlHelperInputExtensions
-
class
Microsoft.AspNetCore.Mvc.Rendering.
HtmlHelperInputExtensions
Methods¶
-
CheckBox
(Microsoft.AspNetCore.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.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
instance this method extends. - expression (System.String) – Expression name, relative to the current model.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> elements.public static IHtmlContent CheckBox(this IHtmlHelper htmlHelper, string expression)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
-
CheckBox
(Microsoft.AspNetCore.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.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
instance this method extends. - expression (System.String) – Expression name, relative to the current model.
- isChecked (System.Boolean) – If <code>true</code>, checkbox is initially checked.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> elements.public static IHtmlContent CheckBox(this IHtmlHelper htmlHelper, string expression, bool isChecked)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
-
CheckBox
(Microsoft.AspNetCore.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.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
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, anSystem.Collections.Generic.IDictionary`2
instance containing the HTML attributes.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> elements.public static IHtmlContent CheckBox(this IHtmlHelper htmlHelper, string expression, object htmlAttributes)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
-
CheckBoxFor<TModel>
(Microsoft.AspNetCore.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.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper`1
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: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> elements.public static IHtmlContent CheckBoxFor<TModel>(this IHtmlHelper<TModel> htmlHelper, Expression<Func<TModel, bool>> expression)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>) – The
-
Hidden
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper, System.String)¶ Returns an <input> element of type “hidden” for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
instance this method extends. - expression (System.String) – Expression name, relative to the current model.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> element.public static IHtmlContent Hidden(this IHtmlHelper htmlHelper, string expression)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
-
Hidden
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper, System.String, System.Object) Returns an <input> element of type “hidden” for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
instance this method extends. - expression (System.String) – Expression name, relative to the current model.
- value (System.Object) – If non-<code>null</code>, value to include in the element.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> element.public static IHtmlContent Hidden(this IHtmlHelper htmlHelper, string expression, object value)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
-
HiddenFor<TModel, TResult>
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel, TResult>>)¶ Returns an <input> element of type “hidden” for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper`1
instance this method extends. - expression (System.Linq.Expressions.Expression<System.Func<TModel, TResult>>) – An expression to be evaluated against the current model.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> element.public static IHtmlContent HiddenFor<TModel, TResult>(this IHtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TResult>> expression)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>) – The
-
Password
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper, System.String)¶ Returns an <input> element of type “password” for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
instance this method extends. - expression (System.String) – Expression name, relative to the current model.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> element.public static IHtmlContent Password(this IHtmlHelper htmlHelper, string expression)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
-
Password
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper, System.String, System.Object) Returns an <input> element of type “password” for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
instance this method extends. - expression (System.String) – Expression name, relative to the current model.
- value (System.Object) – If non-<code>null</code>, value to include in the element.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> element.public static IHtmlContent Password(this IHtmlHelper htmlHelper, string expression, object value)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
-
PasswordFor<TModel, TResult>
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel, TResult>>)¶ Returns an <input> element of type “password” for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper`1
instance this method extends. - expression (System.Linq.Expressions.Expression<System.Func<TModel, TResult>>) – An expression to be evaluated against the current model.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> element.public static IHtmlContent PasswordFor<TModel, TResult>(this IHtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TResult>> expression)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>) – The
-
RadioButton
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper, System.String, System.Object)¶ Returns an <input> element of type “radio” for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
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 <code>null</code>.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> element.public static IHtmlContent RadioButton(this IHtmlHelper htmlHelper, string expression, object value)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
-
RadioButton
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper, System.String, System.Object, System.Boolean) Returns an <input> element of type “radio” for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
instance this method extends. - expression (System.String) – Expression name, relative to the current model.
- value (System.Object) – If non-<code>null</code>, value to include in the element. Must not be <code>null</code> if <em>isChecked</em> is also <code>null</code>.
- isChecked (System.Boolean) – If <code>true</code>, radio button is initially selected. Must not be <code>null</code> if <em>value</em> is also <code>null</code>.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> element.public static IHtmlContent RadioButton(this IHtmlHelper htmlHelper, string expression, object value, bool isChecked)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
-
RadioButton
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper, System.String, System.Object, System.Object) Returns an <input> element of type “radio” for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
instance this method extends. - expression (System.String) – Expression name, relative to the current model.
- value (System.Object) – If non-<code>null</code>, value to include in the element. Must not be <code>null</code> if no “checked” entry exists in <em>htmlAttributes</em>.
- htmlAttributes (System.Object) – An
System.Object
that contains the HTML attributes for the element. Alternatively, anSystem.Collections.Generic.IDictionary`2
instance containing the HTML attributes.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> element.public static IHtmlContent RadioButton(this IHtmlHelper htmlHelper, string expression, object value, object htmlAttributes)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
-
RadioButtonFor<TModel, TResult>
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel, TResult>>, System.Object)¶ Returns an <input> element of type “radio” for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper`1
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 <code>null</code>.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> element.public static IHtmlContent RadioButtonFor<TModel, TResult>(this IHtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TResult>> expression, object value)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>) – The
-
TextArea
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper, System.String)¶ Returns a <textarea> element for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
instance this method extends. - expression (System.String) – Expression name, relative to the current model.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <textarea> element.public static IHtmlContent TextArea(this IHtmlHelper htmlHelper, string expression)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
-
TextArea
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper, System.String, System.Object) Returns a <textarea> element for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
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, anSystem.Collections.Generic.IDictionary`2
instance containing the HTML attributes.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <textarea> element.public static IHtmlContent TextArea(this IHtmlHelper htmlHelper, string expression, object htmlAttributes)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
-
TextArea
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper, System.String, System.String) Returns a <textarea> element for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
instance this method extends. - expression (System.String) – Expression name, relative to the current model.
- value (System.String) – If non-<code>null</code>, value to include in the element.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <textarea> element.public static IHtmlContent TextArea(this IHtmlHelper htmlHelper, string expression, string value)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
-
TextArea
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper, System.String, System.String, System.Object) Returns a <textarea> element for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
instance this method extends. - expression (System.String) – Expression name, relative to the current model.
- value (System.String) – If non-<code>null</code>, value to include in the element.
- htmlAttributes (System.Object) – An
System.Object
that contains the HTML attributes for the element. Alternatively, anSystem.Collections.Generic.IDictionary`2
instance containing the HTML attributes.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <textarea> element.public static IHtmlContent TextArea(this IHtmlHelper htmlHelper, string expression, string value, object htmlAttributes)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
-
TextAreaFor<TModel, TResult>
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel, TResult>>)¶ Returns a <textarea> element for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper`1
instance this method extends. - expression (System.Linq.Expressions.Expression<System.Func<TModel, TResult>>) – An expression to be evaluated against the current model.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <textarea> element.public static IHtmlContent TextAreaFor<TModel, TResult>(this IHtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TResult>> expression)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>) – The
-
TextAreaFor<TModel, TResult>
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel, TResult>>, System.Object) Returns a <textarea> element for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper`1
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, anSystem.Collections.Generic.IDictionary`2
instance containing the HTML attributes.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <textarea> element.public static IHtmlContent TextAreaFor<TModel, TResult>(this IHtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TResult>> expression, object htmlAttributes)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>) – The
-
TextBox
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper, System.String)¶ Returns an <input> element of type “text” for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
instance this method extends. - expression (System.String) – Expression name, relative to the current model.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> element.public static IHtmlContent TextBox(this IHtmlHelper htmlHelper, string expression)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
-
TextBox
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper, System.String, System.Object) Returns an <input> element of type “text” for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
instance this method extends. - expression (System.String) – Expression name, relative to the current model.
- value (System.Object) – If non-<code>null</code>, value to include in the element.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> element.public static IHtmlContent TextBox(this IHtmlHelper htmlHelper, string expression, object value)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
-
TextBox
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper, System.String, System.Object, System.Object) Returns an <input> element of type “text” for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
instance this method extends. - expression (System.String) – Expression name, relative to the current model.
- value (System.Object) – If non-<code>null</code>, value to include in the element.
- htmlAttributes (System.Object) – An
System.Object
that contains the HTML attributes for the element. Alternatively, anSystem.Collections.Generic.IDictionary`2
instance containing the HTML attributes.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> element.public static IHtmlContent TextBox(this IHtmlHelper htmlHelper, string expression, object value, object htmlAttributes)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
-
TextBox
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper, System.String, System.Object, System.String) Returns an <input> element of type “text” for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
instance this method extends. - expression (System.String) – Expression name, relative to the current model.
- value (System.Object) – If non-<code>null</code>, 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: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> element.public static IHtmlContent TextBox(this IHtmlHelper htmlHelper, string expression, object value, string format)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper) – The
-
TextBoxFor<TModel, TResult>
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel, TResult>>)¶ Returns an <input> element of type “text” for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper`1
instance this method extends. - expression (System.Linq.Expressions.Expression<System.Func<TModel, TResult>>) – An expression to be evaluated against the current model.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> element.public static IHtmlContent TextBoxFor<TModel, TResult>(this IHtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TResult>> expression)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>) – The
-
TextBoxFor<TModel, TResult>
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel, TResult>>, System.Object) Returns an <input> element of type “text” for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper`1
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, anSystem.Collections.Generic.IDictionary`2
instance containing the HTML attributes.
Return type: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> element.public static IHtmlContent TextBoxFor<TModel, TResult>(this IHtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TResult>> expression, object htmlAttributes)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>) – The
-
TextBoxFor<TModel, TResult>
(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel, TResult>>, System.String) Returns an <input> element of type “text” for the specified <em>expression</em>.
Arguments: - htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>) – The
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper`1
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: Returns: A new
Microsoft.AspNetCore.Html.IHtmlContent
containing the <input> element.public static IHtmlContent TextBoxFor<TModel, TResult>(this IHtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TResult>> expression, string format)
- htmlHelper (Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>) – The
-