protected void Page_Load(object sender, EventArgs e) { if (CoreContext.UserManager.GetUsers(SecurityContext.CurrentAccount.ID).IsVisitor()) // Redirect to home page if user hasn't permissions or not authenticated. { Response.Redirect("/"); } Accounts = GetAccounts(); _manageFieldPopup.Options.IsPopup = true; _commonPopup.Options.IsPopup = true; Page.Title = HeaderStringHelper.GetPageTitle(MailResource.MailTitle); ProductEntryPoint.ConfigurePortal(); loaderHolder.Controls.Add(LoadControl(LoaderPage.Location)); MailSidePanelContainer.Controls.Add(LoadControl(TagBox.Location)); MailControlContainer.Controls.Add(LoadControl(MailBox.Location)); var helpCenter = (HelpCenter)LoadControl(HelpCenter.Location); helpCenter.IsSideBar = true; sideHelpCenter.Controls.Add(helpCenter); SupportHolder.Controls.Add(LoadControl(Support.Location)); VideoGuides.Controls.Add(LoadControl(VideoGuidesControl.Location)); UserForumHolder.Controls.Add(LoadControl(UserForum.Location)); InviteUserHolder.Controls.Add(LoadControl(InviteLink.Location)); if (!Accounts.Any()) { BlankModalPH.Controls.Add(LoadControl(BlankModal.Location)); } if (!IsCrmAvailable()) { crmContactsContainer.Visible = false; } if (!IsPeopleAvailable()) { tlContactsContainer.Visible = false; } Master .AddStaticBodyScripts(GetStaticJavaScript()) .AddStaticStyles(GetStaticStyleSheet()) .AddClientScript( new ClientLocalizationResources(), new MasterSettingsResources()) .RegisterInlineScript(GetMailInitInlineScript(), true, false) .RegisterInlineScript(GetMailConstantsAsInlineScript(), true, false) .RegisterInlineScript(GetMailPresetsAsInlineScript(), true, false); }