private void SetPageLoadPart()
        {
            ApplicationController objAppController = new ApplicationController();
            if (!objAppController.CheckRequestExtension(Request))
            {
                //CoreJs.IncludeLanguageCoreJs(this.Page);
                SessionTrackerController sTracController = new SessionTrackerController();
                sTracController.SetSessionTrackerValues(currentportalID.ToString(), GetUsername);

            }
        }
 private void SagePageLoadPart()
 {
     try
     {
         SessionTrackerController sTracController = new SessionTrackerController();
         sTracController.SetSessionTrackerValues(currentportalID.ToString(), GetUsername);
     }
     catch
     {
     }
 }
        private void SagePageLoadPart()
        {
            if (!IsPostBack)
            {
                string sageNavigateUrl = string.Empty;
                SageFrameConfig sfConfig = new SageFrameConfig();
                if (IsUseFriendlyUrls)
                {
                    if (GetPortalID > 1)
                    {
                        sageNavigateUrl = ResolveUrl("~/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage).Replace(" ", "-") + SageFrameSettingKeys.PageExtension);
                    }
                    else
                    {
                        sageNavigateUrl = ResolveUrl("~/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage).Replace(" ", "-") + SageFrameSettingKeys.PageExtension);
                    }
                }
                else
                {
                    sageNavigateUrl = ResolveUrl("~/Default" + Extension + "?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage).Replace(" ", "-"));
                }
                hypHome.NavigateUrl = sageNavigateUrl;
                hypHome.Text = sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage);
                hypHome.ImageUrl = GetAdminImageUrl("home.png", true);
                hypPreview.NavigateUrl = sageNavigateUrl;
                lnkAccount.NavigateUrl = GetProfileLink(sfConfig);
                Image imgProgress = (Image)UpdateProgress1.FindControl("imgPrgress");
                if (imgProgress != null)
                {
                    imgProgress.ImageUrl = GetAdminImageUrl("ajax-loader.gif", true);
                }
                // bool IsAdmin = false;
                FormsAuthenticationTicket ticket = SecurityPolicy.GetUserTicket(GetPortalID);
                if (ticket != null)
                {
                    int LoggedInPortalID = int.Parse(ticket.UserData.ToString());
                    if (ticket.Name != ApplicationKeys.anonymousUser)
                    {
                        string[] sysRoles = SystemSetting.SUPER_ROLE;
                        this.hypUpgrade.Visible = Roles.IsUserInRole(ticket.Name, sysRoles[0]) ? true : false;
                        if (GetPortalID == LoggedInPortalID || Roles.IsUserInRole(ticket.Name, sysRoles[0]))
                        {
                            RoleController _role = new RoleController();
                            string userinroles = _role.GetRoleNames(GetUsername, LoggedInPortalID);
                            if (userinroles != "" || userinroles != null)
                            {
                                divAdminControlPanel.Attributes.Add("style", "display:block");
                                ////foreach (string role in sysRoles)
                                ////{
                                ////    if (Roles.IsUserInRole(user.UserName, role))
                                ////    {
                                ////        IsAdmin = true;
                                ////        break;
                                ////    }
                                ////}
                            }
                            else
                            {
                                divAdminControlPanel.Attributes.Add("style", "display:none");
                            }
                        }
                        else
                        {
                            divAdminControlPanel.Attributes.Add("style", "display:none");
                        }
                    }
                    else
                    {
                        divAdminControlPanel.Attributes.Add("style", "display:none");
                    }

                }
                if (IsHandheld())
                {
                    divAdminControlPanel.Attributes.Add("style", "display:none");
                }
            }
            SessionTrackerController sTracController = new SessionTrackerController();
            sTracController.SetSessionTrackerValues(GetPortalID.ToString(), GetUsername);
        }