Ejemplo n.º 1
0
        /// <summary>
        /// Add scriptFileName's script url to Page.Items
        /// </summary>
        /// <param name="page">page</param>
        /// <param name="scriptItem">file name under App_Data/Script</param>
        public static void AddScript(Page page, string scriptFileName)
        {
            IEnumerable <XElement> scriptList = ScriptItem.GetJSList(scriptFileName);

            if (scriptList != null)
            {
                foreach (XElement x in scriptList)
                {
                    PageHelpers.Add(page, "ScriptList", x.Value);
                }
            }
        }