示例#1
0
        protected void btnLogout_Click(object sender, System.EventArgs e)
        {
            // Log out
            AuthenticationModule am = (AuthenticationModule)Context.ApplicationInstance.Modules["AuthenticationModule"];

            am.Logout();
            this.pnlLogin.Visible    = true;
            this.pnlUserInfo.Visible = false;
            // Redirect to self to refresh rendering of the page because this event happens after
            // everything is already constructed.
            Context.Response.Redirect(Context.Request.RawUrl);
        }
示例#2
0
        public void Logout()
        {
            AuthenticationModule am = (AuthenticationModule)Controller.GetCurrentContext().ApplicationInstance.Modules["AuthenticationModule"];

            am.Logout();
        }