<input type="checkbox" name="@Model.FieldName" value="@Model.CheckboxValue" id="@Model.FieldName" />
When checkbox is checked and submitted the form, the request.form has the value of 'on' for checkbox, but I want the value to have @Model.CheckboxValue. I do not want to set 'checked' as the default option for checkbox.
Can we set in the value field above without any javascript?
Aucun commentaire:
Enregistrer un commentaire