ASP.NET CheckBox disabling postbacks using javascript
I am trying to hook up a CheckBox to handle the check / uncheck event. If the user has JavaScript enabled, use it, otherwise use postback.
Here is my code:
<asp:CheckBox ID="ApplicationInProcessCheckBox" runat="server"
Text="Application In Process" AutoPostBack="true"
oncheckedchanged="ApplicationInProcessCheckBox_CheckedChanged"
onclick="return false;" />
Returning false on the javascript onclick event disables the postback. However, it will also prevent the box from being checked or unchecked. (I have more code to add to the javascript event ... I just want the concept to work in the first place).
What am I doing wrong?
+1
a source to share