Consider the following code which has a CheckBox and a submit button:
@using (Html.BeginForm()) { <input type="checkbox" name="Select" /> <input type="submit" value="Submit" /> }
Submit the form. The request body has the form data with name-value pairs. If the user checks the checkbox, the form data has Select=on
. If the user clears the checkbox, the form data does not contain Select
.…