ghanshyam.mirani
ghanshyam.mirani

Reputation: 3101

how to Call a Javascript or jquery when asp.net validator validate?

I have an asp.net application.. i have added validation controls added in my aspx pages. i just want to Make Enable or Disable one Image based on validator's Validate event fires on Clientside..

how can i call a Javascript when Validator controls fires Validate ?

I mean is there any Clientside event like OnValidate or afterValidate of CompareFieldValidator Control ???

Thanks

Upvotes: 0

Views: 474

Answers (1)

Kiran1016
Kiran1016

Reputation: 914

You can do it in 3 ways.

1)You can use custom validator to use your java script in the validator

2)you can fire validator from java script explicitly

3)you can use both java script and Validator together.but you need to add one condition in java script to both work together. the condition is:

if (Page_ClientValidate() == true) { put your code here }

Upvotes: 1

Related Questions