private string GetPopupClientID(Page _page) { SelectPopup sp = null; sp = GetSelectPopupFromCollection(_page.Controls); if (sp != null) { _className = sp.ClassName; return(sp.ClientID); } return(""); }
private SelectPopup GetSelectPopupFromCollection(ControlCollection coll) { SelectPopup retVal = null; foreach (Control c in coll) { if (c is SelectPopup && c.ID == SelectPopupID) { retVal = (SelectPopup)c; break; } else { retVal = GetSelectPopupFromCollection(c.Controls); if (retVal != null) { break; } } } return(retVal); }