Recursive Goodness - II

Find a control within a control recursively:

protected void Control FindControlRecursive(Control Root, string Id)
    if (Root.ID == Id)
    return Root;
    foreach (Control Ctl in Root.Controls)
        Control FoundCtl = FindControlRecursive(Ctl, Id);
        if (FoundCtl != null)
        return FoundCtl;
    return null;
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!