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 AddStyle(Page page, string styleFileName)
        {
            IEnumerable <XElement> styleList = StyleItem.GetStyleList(styleFileName);

            if (styleList != null)
            {
                foreach (XElement x in styleList)
                {
                    PageHelpers.Add(page, "StyleList", x.Value);
                }
            }
        }
Ejemplo n.º 2
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);
                }
            }
        }