Export (0) Print
Expand All

InputExtensions.CheckBox Method

Returns a check box input element that enabless the user to select a true or false condition.

  NameDescription
Public method Static member CheckBox(HtmlHelper, String) Returns a check box input element by using the specified HTML helper and the name of the form field.
Public method Static member CheckBox(HtmlHelper, String, Boolean) Returns a check box input element by using the specified HTML helper, the name of the form field, and a value to indicate whether the check box is selected.
Public method Static member CheckBox(HtmlHelper, String, IDictionary<String, Object>) Returns a check box input element by using the specified HTML helper, the name of the form field, and the HTML attributes.
Public method Static member CheckBox(HtmlHelper, String, Object) Returns a check box input element by using the specified HTML helper, the name of the form field, and the HTML attributes.
Public method Static member CheckBox(HtmlHelper, String, Boolean, IDictionary<String, Object>) 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.
Public method Static member CheckBox(HtmlHelper, String, Boolean, Object) Returns a check box input element by using the specified HTML helper, the name of the form field, a value that indicates whether the check box is selected, and the HTML attributes.
Top

Check boxes are used when you want to let the user select one or more options from a set of alternatives. If only one option should be selected at a time, you should use radio buttons instead.

Community Additions

Show:
© 2014 Microsoft