Archive for October, 2011

Dynamic Custom Validator Not Showing on Validation Summary

CustomValidator val = new CustomValidator();
val.IsValid = false;
val.ErrorMessage = tempError;
// this is essential for making "ValidationSummary" being shown in multiview environment
val.ValidationGroup = "ValidateGroup1"; 
this.Page.Validators.Add(val);

No Comments