public static T GetCmp <T>(string id) where T : Component, new() { T component = ComponentManager.Get <T>(id) ?? new T { ID = id, IsProxy = true }; if (X.IsAjaxRequest) { IXPostBackDataHandler ctrl = component as IXPostBackDataHandler; if (ctrl != null && !ctrl.HasLoadPostData) { ctrl.LoadPostData(id, HttpContext.Current.Request.Params); } } if (X.ResourceManager == null) { component.GenerateMethodsCalling = true; } component.AllowCallbackScriptMonitoring = true; return(component as T); }
public static T GetCmp <T>(string id) where T : ComponentBase { return(ComponentManager.Get <T>(id)); }
public static BaseControl GetCmp(string id) { return(ComponentManager.Get(id)); }
public static AbstractComponent GetCmp(string id) { return(ComponentManager.Get(id)); }
/* ComponentMgr * -----------------------------------------------------------------------------------------------*/ /// <summary> /// Returns a Component by id. /// </summary> /// <param name="id">The Component id</param> /// <returns>The Component, or throws ArgumentNullException if not found</returns> public static Component GetCmp(string id) { Component component = ComponentManager.Get(id); return(X.SetValue <Component>(component, X.GetValue(id))); }
/* ComponentMgr * -----------------------------------------------------------------------------------------------*/ /// <summary> /// Returns a AbstractComponent by id. /// </summary> /// <param name="id">The AbstractComponent id</param> /// <returns>The AbstractComponent, or throws ArgumentNullException if not found</returns> public static BaseControl GetCmp(string id) { BaseControl component = ComponentManager.Get(id); return(X.SetValue <BaseControl>(component, X.GetValue(id))); }