Example #1
0
        protected override void OnPreRender(EventArgs e)
        {
            //VERY IMPORT FOR CHANGE CONTROL
            //Adds the compile version to the end of any links to css or javascript files forcing the browser to get the latest version upon first visit
            //foreach (var ctrl in Page.Header.Controls)
            //    if (ctrl is HtmlLink) //Updates all .css files with .css?Rev=<VERSION>
            //        ((HtmlLink)ctrl).Href = String.Concat(
            //            ((HtmlLink)ctrl).Href,
            //            "?Rev=", Session["Version"].ToString());
            //    else if (ctrl is LiteralControl)//Updates all .js files with .js?Rev=<VERSION>
            //        ((LiteralControl)ctrl).Text = ((LiteralControl)ctrl).Text.Replace(".js\"", String.Format(".js?Rev={0}\"", Session["Version"].ToString()));


            base.OnPreRender(e);
            JavaScriptHelper.IncludeJQuery(Page.ClientScript);
            JavaScriptHelper.IncludeDropdown(Page.ClientScript);
            JavaScriptHelper.IncludeProduction(Page.ClientScript);
            JavaScriptHelper.IncludeResultMaster(Page.ClientScript);
            if ((bool?)HttpContext.Current.Session["benchmark"] ?? false)
            {
                HtmlMeta m = new HtmlMeta();
                m.Attributes["http-equiv"] = "X-UA-Compatible";
                m.Attributes["content"]    = "IE=edge";
                Page.Header.Controls.AddAt(0, m);
            }
        }
Example #2
0
 protected override void OnPreRender(EventArgs e)
 {
     //VERY IMPORT FOR CHANGE CONTROL
     base.OnPreRender(e);
     //JavaScriptHelper.IncludeJQueryTabs(Page.ClientScript);
     JavaScriptHelper.IncludeJQuery(Page.ClientScript);
     JavaScriptHelper.IncludeDropdown(Page.ClientScript);
     JavaScriptHelper.IncludeProduction(Page.ClientScript);
     JavaScriptHelper.IncludeSearchMaster(Page.ClientScript);
     if ((bool?)HttpContext.Current.Session["benchmark"] ?? false)
     {
         HtmlMeta m = new HtmlMeta();
         m.Attributes["http-equiv"] = "X-UA-Compatible";
         m.Attributes["content"]    = "IE=edge";
         Page.Header.Controls.AddAt(0, m);
     }
 }