Html.CheckBoxFor() checked problem in ASP.Net MVC 2
- by inolen
It doesn't seem that the Html.CheckBoxFor helper adds the correct "checked" attribute when rendering the HTML.
I have a bool property rendered like so:
<%= Html.CheckBoxFor(m => m.Visible) %>
And the outputted HTML is this:
<input type="checkbox" value="true" name="Visible" id="Visible">
Is there some particular reason it does not add the "checked" attribute when the value is true?