AjaxControlToolkit.HtmlEditor.Popups.Popup.GetExistingPopup C# (CSharp) Метод

GetExistingPopup() публичный статический Метод

public static GetExistingPopup ( Control parent, Type type ) : Popup
parent System.Web.UI.Control
type System.Type
Результат Popup
        public static Popup GetExistingPopup(Control parent, Type type)
        {
            foreach(Control ctrl in parent.Controls) {
                if(ctrl.GetType().Equals(type))
                    return (ctrl as Popup);
                else {
                    var foundControl = GetExistingPopup(ctrl, type);
                    if(foundControl != null)
                        return foundControl;
                }
            }

            return null;
        }