views:

105

answers:

3

Hello,

I am trying to invoke a javascript function when a ValidationSummary shows the errors on a page.

Is this possible?

+1  A: 

if you do not find another way to make a "JS user function", you can try this way:

var oldValidationSummaryOnSubmit = ValidationSummaryOnSubmit;
var ValidationSummaryOnSubmit = function(validationGroup){

    /*
    my code before
    */

    // call old (MS ASP.NET function) ValidationSummaryOnSubmit
    oldValidationSummaryOnSubmit(validationGroup);

    /*
    my code  after
    */

}
andres descalzo
A: 

As far as I know, there isn't any event that fired after validation summary showed. But at client side we can check if the page is valid by Page_IsValid variable. Check here for more information.

Canavar
A: 

You can manually call your validation and do what you want.

rick schott