Suppressing .net's updatepanel submit event handler

Posted by wheresrhys on Stack Overflow See other posts from Stack Overflow or by wheresrhys
Published on 2011-02-14T14:58:29Z Indexed on 2011/02/14 15:25 UTC
Read the original article Hit count: 264

Filed under:
|
|
|
|

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?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about .NET