asp.net mvc: simulating autopostback for simple checkbox
asp.net-mvc
Solution
Add an onClick handler to the CheckBox that submits the form the CheckBox belongs to...quick, clickHandler codeless example:
<%= Html.CheckBox("myCB",
new { onClick = "$(this).parent('form:first').submit();" });
(example definitely not checked for accuracy)
Problem
I have a simple checkbox, generated with: ``` <%= Html.CheckBox("myCB" )%> ``` How can I add an onChange handler to this that does a submit?