void Page_PreRender() { foreach (BaseValidator valControl in Page.Validators) { WebControl assControl = (WebControl)Page.FindControl(valControl.ControlToValidate); if (!valControl.IsValid) assControl.BackColor = System.Drawing.Color.Yellow; else assControl.BackColor = System.Drawing.Color.White; } }
Page Load :
Prerender :
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)