Finding Particular Controls in Page |
private Control FindNestedControl(Control parent, string controlid) { Control c = parent.FindControl(controlid); if (c != null) return c; else { foreach (Control child in parent.Controls) { c = FindNestedControl(child, controlid); if (c != null) return c; } } return null; } Eg :- DropDownList ddlMyList = FindNestedControl(this.Page," ddlMyList") as DropDownList; |
Thursday, July 9, 2009
Finding Particular Controls in Page
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment