Wednesday, March 7, 2012

Page.IsValid Property Returning False

If you have too many controls and validators(required field validator custom etc...) on your aspx page and you ever wondered which validator on your aspx page is causing Page.IsValid to return false or true This might come handy:) foreach (object o in Validators) { if (!((IValidator)o).IsValid) { Response.Write(((Control)o).ID + "
"); } }
Source:-http://forums.asp.net/t/1464738.aspx/1