Name and Value in form submit

19 Dec 20221 minute to read

The name attribute of the CheckBox is used to group Checkboxes. When the Checkboxes are grouped in form, the checked items value attribute will post to the server on form submit that can be retrieved through the name. The disabled and unchecked CheckBox value will not be sent to the server on form submit.

In the following code snippet, Cricket and Hockey are in the checked state, Tennis is in disabled state and Basketball is in unchecked state. Now, the value that is in checked state only be sent on form submit.



.e-checkbox-wrapper {
  margin-top: 18px;

button {
  margin: 20px 0 0 5px;

li {
  list-style: none;

public ActionResult Form()
    return View();


View Sample in GitHub.