Suppressing .net's updatepanel submit event handler
- by wheresrhys
I'm performing some custom js validation on my forms, triggered by submitting the form
$("form").submit(function (e) {
var validates = true;
// validation code goes in here
if (!validates) {
e.preventDefault();
e.stopImmediatePropagation();
return false;
}
})
None of the lines I've included to stop the submit event prevent the .NET control posting back. Is there some way (using js or setting a property in the updatepanel control) of stopping post back?