Hi all,
I have compare validators that I build on the fly in code behind that validate textboxes that are also built up in the code behind:
CompareValidator CV = new CompareValidator();
CV.ID = "CV" + parameter.Name;
CV.Type = ValidationDataType.Date;
CV.Operator = ValidationCompareOperator.DataTypeCheck;
CV.ErrorMessage = "* Invalid date";
CV.Display = ValidatorDisplay.Static;
CV.ControlToValidate = parameter.Name;
CV.ValidationGroup = "valGroup1";
CV.Style["font"] = "Arial";
CV.Style["color"] = "Red";
CV.Style["font-size"] = "10px";
CV.EnableClientScript = true;
TD.Controls.Add(CV);
These work fine until a postback occurs. After a postback they still validate the form (i.e. they don't let you postback) but the error message won't display. Can anybody please help?
Thanks,
Paul.
...
Go to the complete details ...