Exemplo n.º 1
0
        private HtmlAnchor CreateLink()
        {
            HtmlAnchor anchor = new HtmlAnchor();

            anchor.Style["border"] = "none";

            HtmlImage img = new HtmlImage();

            img.Style["border"] = "none";

            string ru = this.ResolveUrl(ReturnUrl);

            anchor.HRef   = PassportManager.GetLogOnOrLogOffUrl(ru, this.AutoRedirect, this.LogOffAll);
            anchor.Target = this.Target;

            if (IsTicketValid)
            {
                img.Src = SignOutImage;
            }
            else
            {
                img.Src = SignInImage;
            }

            anchor.Controls.Add(img);

            return(anchor);
        }
Exemplo n.º 2
0
        private HtmlAnchor CreateLink()
        {
            HtmlAnchor anchor = new HtmlAnchor();

            anchor.Style["border"] = "none";

            HtmlImage img = new HtmlImage();

            img.Style["border"] = "none";

            string ru = this.ResolveUrl(ReturnUrl);

            if (ru.IsNullOrEmpty())
            {
                ru = UriHelper.RemoveUriParams(Page.Request.Url.ToString(), "t");
            }

            ru            = ChangeToAbsoluteUrl(ru);
            anchor.HRef   = PassportManager.GetLogOnOrLogOffUrl(ru, this.AutoRedirect, this.LogOffAll);
            anchor.Target = this.Target;

            if (IsTicketValid)
            {
                img.Src = SignOutImage;
            }
            else
            {
                img.Src = SignInImage;
            }

            anchor.Controls.Add(img);

            return(anchor);
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Cache.SetNoStore();
            PassportManager.ClearSignInCookie();
            string url = this.Request.Url.AbsoluteUri;

            url = url.Substring(0, url.LastIndexOf("/") + 1);

            Response.Redirect(PassportManager.GetLogOnOrLogOffUrl(url + "OGUAdmin.aspx", true, true));

            //Response.Redirect(PassportManager.GetLogOnOrLogOffUrl("~/OGUAdmin.aspx", true));
        }
Exemplo n.º 4
0
        protected override void OnPreRender(EventArgs e)
        {
            this.SetAttribute("style", "display:none");
            this.SetAttribute("data-role", "logoutlink");
            if (DeluxeIdentity.CurrentUser != null)
            {
                this.SetAttribute("data-login-name", DeluxeIdentity.CurrentUser.LogOnName);
                this.SetAttribute("data-login-user", DeluxeIdentity.CurrentUser.DisplayName);
            }
            string url = PassportManager.GetLogOnOrLogOffUrl(this.ResolveUrl("~/Default.aspx"), true, true);

            this.HRef = url;
            base.OnPreRender(e);
        }