Hi,
I have a Formview with a customvalidator tied to one of the textboxes. I am using the Server_validate method and it is firing twice!
int i =0;
protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args)
{
i=i+1;
if (i==1) { args.IsValid=true; } else {args.IsValid = false;}
}
<asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="NumberTextBox"
ErrorMessage="Credit Card information could not be validated. Please verify the information you provided"
OnServerValidate="CustomValidator1_ServerValidate" ValidationGroup="G1">*</asp:CustomValidator>
adds two to the value! Any ideas on what is wrong?
Thanks,
Mo