/// <summary> /// Register scripts at the start up of the page. /// </summary> /// <param name="__list"></param> /// <param name="__page"></param> private static void registerScriptToPageStart(ScriptList __list, Page __page) { foreach (String strScriptKey in __list.getAllKeys()) { __page.ClientScript.RegisterStartupScript(__page.GetType(), strScriptKey, __list.getValue(strScriptKey)); } }
/// <summary> /// Register script to the page /// </summary> /// <param name="__list">List of script paths</param> /// <param name="__page"></param> private static void registerScriptToPage(ScriptList __list, Page __page) { foreach (String strScriptKey in __list.getAllKeys()) { if (!__page.ClientScript.IsClientScriptIncludeRegistered(strScriptKey)) { __page.ClientScript.RegisterClientScriptInclude(strScriptKey, __list.getValue(strScriptKey)); } } }
/// <summary> /// Constructor /// </summary> /// <param name="__strRoot"Base path root></param> public ScriptResourceManager(String __strRoot) { _RenderScript = new ScriptList(__strRoot); _StarUpRenderScript = new ScriptList(__strRoot); _strRoot = __strRoot; }