Returns a check box input element for each property in the object that is represented by the specified expression, using the specified HTML attributes.
public static System.Web.Mvc.MvcHtmlString CheckBoxFor (this System.Web.Mvc.HtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, System.Collections.Generic.IDictionary htmlAttributes);
static member CheckBoxFor : System.Web.Mvc.HtmlHelper * System.Linq.Expressions.Expression> * System.Collections.Generic.IDictionary -> System.Web.Mvc.MvcHtmlString
Public Function CheckBoxFor(Of TModel) (htmlHelper As HtmlHelper(Of TModel), expression As Expression(Of Func(Of TModel, Boolean)), htmlAttributes As IDictionary(Of String, Object)) As MvcHtmlString
Type Parameters
TModel
The type of the model.
Parameters
The HTML helper instance that this method extends.
expression
An expression that identifies the object that contains the properties to render.
A dictionary that contains the HTML attributes to set for the element.
Returns
An HTML input element whose type attribute is set to "checkbox" for each property in the object that is represented by the specified expression, using the specified HTML attributes.
Exceptions
The expression parameter is null.
Applies to