Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 2
    This code does work. It basically makes the checkbox control look like a normal input ( type text, or a select) to the serialize() function by giving the checkbox a value property - that keeps in sync with the checked status. And it's more elegant than the selected answer.
    – Annabel
    Commented Nov 14, 2018 at 0:08
  • for .Net MVC, using values of True and False will allow mvc model mapping magic to set your Boolean model properties. And add these attributes to your <input> to get proper view rendering: value="@(Model.Item2.IsCurrent ? "True" : "False" )" @(Model.Item2.IsCurrent ? "checked='checked'" : "" )
    – DavidCC
    Commented Jan 18, 2020 at 0:15