Author: misuk11 | Posted on: 7/2/2009 7:49:53 AM | Views : 265

I have to create a custom validation function for a web page that doesnt validate on the client, all validation is to be done server side and a custom error list displayed on the web page.


Ive been looking at the CustomValidator but I cant get it to work, the ServerValidate event is firing, heres the markup


<asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="enter a first name" ControlToValidate="TextBoxFirstname" onservervalidate="CustomValidator1_ServerValidate"></asp:CustomValidator>

and the server side code
protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args) { //some code for testing string ...

Go to the complete details ...