Does anyone know the syntax for setting a click event or keyup event on a checkbox in the following c# code? I\'m trying to set the 3rd parameter htmlAttributes (after the 2
This should do the trick:
<%= Html.CheckBox("chkStatus_" + item.Value, true, new { onclick = "doSomething();" }); %>
or Razor
@Html.CheckBox("chkStatus_" + item.Value, true, new { onclick = "doSomething();" })