Recursive Goodness - I

Check 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;
}
If you have any questions or comments, please post them below. If you liked this post, you can share it with your followers or follow me on Twitter!