I just realized you were working on a server side method and not a client side JavaScript function.
For server side validation, try this:
private void CustomValidator1_ServerValidate(object source, System.Web.UI.WebControls.ServerValidateEventArgs args)
{
}
Create a method with this signature (e.g. have it accept an object and a ServerValidateEventArgs).
Just as with my JavaScript example, set the IsValid property of the args argument to either true or false.
To make this work, hook up the ServerValidate of your CustomValidator to this method:
this.CustomValidator1.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandl er(this.CustomValidator1_ServerValidate);
That should do the trick. If not, can you provide more detail about your current code?
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to:
Your Eyes Open by
Keane (Track 6 from the album:
Hopes and Fears)
What's This?