/// <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> /// 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)); } }