Control c = FindControlRecursive(Page, "ControlId");if (c != null){
...//Process control
}
private 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;}
No comments:
Post a Comment