views:

185

answers:

2

Hello,

I'm developing in asp.net 2.0. I'm using the asp:RegularExpressionValidator to check for a valid url. How do I invoke the check from a javascript function?

+2  A: 

The validator will fire for the first time when you submit the form and again on any subsequent change to the textbox text.

Did you want to validate at another time? You can validate all controls in JavaScript by calling

Page_ClientValidate()
Russ Cam
A: 

The javascript function will fire automatically, assuming you have set the property EnableClientScript to true.

Codebrain