Unable to Access the Dynamic control-Collection of common programming errors
A recursive FindControl might be more helpful if you do have the control’s ID.
public static T FindControlRecursive(this Control parentControl, string id) where T : Control
{
T ctrl = default(T);
if ((parentControl is T) && (parentControl.ID == id))
return (T)parentControl;
foreach (Control c in parentControl.Controls)
{
ctrl = c.FindControlRecursive(id);
if (ctrl != null)
break;
}
return ctrl;
}
// and then: Page.FindControlRecursive(idOfYourControl);