HTML Input Checkbox return 'On' instead of 'True' when submitting form

Viewed 97113

I have a MVC3 app using Project Awesome (http://awesome.codeplex.com/), but I am getting a weird behaviour on checkboxes. I have the following simple Html within a Modal popup <input type="checkbox" class="check-box" name="IsDeleted">

When I submit the form containing this element, its post value is 'on' instead of the expected 'true' (when element is checked).

Does anybody know why this is? I am assuming there may be some javascript somewhere messing with the form data, but wanted to check whether there isn't some HTML I am missing.

Thanks

8 Answers

Check Checkbox is checked or not if checked set Hidden field true else set hidden field false.

$('#hiddenFieldId').val($('#CheckBoxId').attr('checked')=='checked')
Related