Is there a simple way to find a control in ASP.NET by id (in any nested container)? Other than traversing whole controls tree.
Something like this example:
TextBox tb = new TextBox() { ID = "textboxId"};
panel3.Controls.Add(tb);
And in other method/class:
TextBox nameTextbox = MethodToFindControl("textboxId") as TextBox;
No … You have to traverse all controls tree until you find the control then you stop traversing, your method (MethodToFindControl) shall be a recursive method that takes two arguments: the root container (most of the time its the page) and the id of the control to look for.