views:

99

answers:

2

This is a bit of a tough question to ask. I am using asp.net validators, but I want to tie them to a simple click event which I bind with jQuery.

I have found that I can use:

ValidatorValidate($("#<%= rfvFirst.ClientID %>")[0]);

to fire the rfvFirst validator, but I do not know how to get the actual false return somewhere to tell me that the form is not valid.

All I need is the function or variable or property that I can call on (client side) to tell me if the form is valid.

I hope that makes sense, thank you.

A: 

If your using validation groups you can do:

if (Page_ClientValidate('Group Name'))
{
 //Valid
}
JoshBerke
perfect, thank you!
Stuck In Baghdad
A: 

Page_IsValid would tell you whether the Page is valid. you can also use the isvalid property of the validator to validate the individual validator.

Ramesh