Esempio n. 1
0
        private void Page_PreInit(object sender, EventArgs e)
        {
            bool bPrintForm = false;

            if (Request.QueryString["Print"] != null)
            {
                bPrintForm = (Request.QueryString["Print"].ToString() == "Y");
            }

            if (bPrintForm)
            {
                this.MasterPageFile = "~/Print.master";
                Session[CONST_SESSION_SHEETISPRINTING] = "Y";
            }
            else
            {
                CheckBrowser _CheckBrowser    = new CheckBrowser();
                bool         _RunningOnMobile = _CheckBrowser.fBrowserIsMobile();
                Session[CheckBrowser.CONST_SESSION_RUNNINGONMOBILE] = _RunningOnMobile;

                if (_RunningOnMobile)
                {
                    this.MasterPageFile = "~/MobileSite.master";
                }
                else
                {
                    this.MasterPageFile = "~/Site.master";
                }
                Session[CONST_SESSION_SHEETISPRINTING] = "N";
            }
        }
Esempio n. 2
0
        protected void Page_PreInit(object sender, EventArgs e)
        {
            CheckBrowser _CheckBrowser = new CheckBrowser();

            if (_CheckBrowser.fBrowserIsMobile())
            {
                this.MasterPageFile = "~/MobileSite.master";
            }
            else
            {
                this.MasterPageFile = "~/Site.master";
            }
        }
Esempio n. 3
0
        protected void Page_PreInit(object sender, EventArgs e)
        {
            CheckBrowser _CheckBrowser    = new CheckBrowser();
            bool         _RunningOnMobile = _CheckBrowser.fBrowserIsMobile();

            Session[CheckBrowser.CONST_SESSION_RUNNINGONMOBILE] = _RunningOnMobile;

            if (_RunningOnMobile)
            {
                this.MasterPageFile = "~/MobileSite.master";
            }
            else
            {
                this.MasterPageFile = "~/Site.master";
            }
        }