//private string GetUpgraderUrl()
        //{
        //    string upgradeLink = string.Empty;
        //    if (GetPortalID > 1)
        //    {
        //        upgradeLink = "~/portal/" + GetPortalSEOName + "/Admin/sfUpgrader" + Extension;
        //    }
        //    else
        //    {
        //        upgradeLink = "~/Admin/sfUpgrader" + Extension;
        //    }
        //    return upgradeLink;
        //}

        private void SetPortalCofig()
        {
            Hashtable       hstPortals = GetPortals();
            SageUserControl suc        = new SageUserControl();

            suc.PagePath = PagePath;
            int portalID = 1;

            #region "Get Portal SEO Name and PortalID"
            if (string.IsNullOrEmpty(Request.QueryString["ptSEO"]))
            {
                if (string.IsNullOrEmpty(PortalSEOName))
                {
                    PortalSEOName = GetDefaultPortalName(hstPortals, 1);
                }
                else if (!hstPortals.ContainsKey(PortalSEOName.ToLower().Trim()))
                {
                    PortalSEOName = GetDefaultPortalName(hstPortals, 1);
                }
                else
                {
                    portalID = int.Parse(hstPortals[PortalSEOName.ToLower().Trim()].ToString());
                }
            }
            else
            {
                PortalSEOName = Request.QueryString["ptSEO"].ToString().ToLower().Trim();
                portalID      = Int32.Parse(Request.QueryString["ptlid"].ToString());
            }
            #endregion
            suc.SetPortalSEOName(PortalSEOName.ToLower().Trim());
            Session[SessionKeys.SageFrame_PortalSEOName]               = PortalSEOName.ToLower().Trim();
            Session[SessionKeys.SageFrame_PortalID]                    = 1;
            Session[SessionKeys.SageFrame_AdminTheme]                  = ThemeHelper.GetAdminTheme(1, GetUsername);
            Globals.sysHst[ApplicationKeys.ActiveTemplate + "_" + 1]   = TemplateController.GetActiveTemplate(1).TemplateSeoName;
            Globals.sysHst[ApplicationKeys.ActivePagePreset + "_" + 1] = PresetHelper.LoadActivePagePreset(GetActiveTemplate, GetPageSEOName(Request.Url.ToString()));
            suc.SetPortalID(1);
            SetPortalID(1);
            #region "Set user credentials for modules"
            //SecurityPolicy objSecurity = new SecurityPolicy();
            //if (objSecurity.GetUser(1) != string.Empty)
            //{
            //    SettingProvider objSP = new SettingProvider();
            //    SageFrameConfig sfConfig = new SageFrameConfig();
            //    string strRoles = string.Empty;
            //    List<SageUserRole> sageUserRolles = objSP.RoleListGetByUsername(objSecurity.GetUser(1), 1);
            //    if (sageUserRolles != null)
            //    {
            //        foreach (SageUserRole userRole in sageUserRolles)
            //        {
            //            strRoles += userRole.RoleId + ",";
            //        }
            //    }
            //    if (strRoles.Length > 1)
            //    {
            //        strRoles = strRoles.Substring(0, strRoles.Length - 1);
            //    }
            //    if (strRoles.Length > 0)
            //    {
            //        SetUserRoles(strRoles);
            //    }
            //}
            #endregion
        }