public T FindTemplateControl <T>(string id) where T : Control { var content = PopupPanel.FindControl <PlaceHolder>("popupContent"); if (content != null) { var panel = content.Controls[0]; if (panel != null) { return(panel.FindControl <T>(id)); } } return(null); }