Schon vor längerer Zeit habe ich mir eine kleine Methode geschrieben, um Controls auf einer ASP.NET Seite per ID zu finden. Vielleicht hat der eine oder andere ja verwendung dafür.
public static Control FindControlRecursive(Control root, string id) { if (root.ID == id) { return root; } foreach (Control c in root.Controls) { Control t = FindControlRecursive(c, id); if (t != null) { return t; } } return null; }