Whenever I have an ASP.NET button on a page that I don't want to post back to the server if some client side check has failed I simply have the button's JavaScript "onclick" event return false:
How do I accomplish the same thing using an event listener?
Code:
<input type="button" id="myAspNetButton" value="my asp.net button" onclick="return myJavaScriptFunction();"></input>
Comment