Recursive Goodness - I
15 Oct 2007Check to see if all the controls within a specific control are valid:
protected bool checkIsValid(Control c) { bool result = true; foreach (Control child in c.Controls) { if (child is BaseValidator && !((IValidator)child).IsValid) { return false; } result = result & checkIsValid(child); } return result; }