My model shows my bool property as false when passed into the View but the view then shows the button in a 'checked' state although the underlying state is still false when I submit the form back through the controller... any ideas?
Here's my index.cshtml
<script type="text/javascript">
$(document).ready(function(){
$(".chk").button();
});
</script>
@Html.CheckBoxFor(m => m.IsAnyDateJoined, new { @class="chk" })
@Html.LabelFor(m => m.IsAnyDateJoined)
So, as explained, why does my model show IsAnyDateJoined (bool=false) although I see the 'checked/true' checkbox state, the underlying Model bool is still rendered as false ??
IsAnyDateJoined: False
Very confusing from a UI perspective. Any help much appreciated.
<input class="chk" id="IsAnyDateJoined" name="IsAnyDateJoined" type="checkbox" value="true" /><input name="IsAnyDateJoined" type="hidden" value="false" /><label for="IsAnyDateJoined">IsAnyDateJoined</label>cThe property is definitely false, as I render it within the view to be sure. So a bit confused as to whyvalue="true"is set for the checkbox ? - BarryFanta