InputExtensions.CheckBox Method (HtmlHelper, String, Boolean, IDictionary<String, Object>)
.NET Framework 3.5
Returns a check box input element by using the specified HTML helper, the name of the form field, a value to indicate whether the check box is selected, and the HTML attributes.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
public static string CheckBox( this HtmlHelper htmlHelper, string name, bool isChecked, IDictionary<string, 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.
- isChecked
- Type: System.Boolean
true to select the check box; otherwise, false.
- htmlAttributes
- Type: System.Collections.Generic.IDictionary<String, Object>
The HTML attributes for the element.