public static void CheckMainPageReferer() { if (HttpContext.Current.Request.Url.Segments[1] != "MainPage.aspx" && HttpContext.Current.Request.UrlReferrer == null) { BUser.ClearUserCach(); FormsAuthentication.SignOut(); FormsAuthentication.RedirectToLoginPage(); } }
protected void imgbtnLogOut_onClick(object sender, ImageClickEventArgs e) { //Application.Lock(); //Application["UserOnlineCount"] = Convert.ToInt32(Application["UserOnlineCount"]) - 1; //Application.UnLock(); BUser.ClearUserCach(); FormsAuthentication.SignOut(); FormsAuthentication.RedirectToLoginPage(); }
protected void Login_Click(object sender, EventArgs e) { BUser.ClearUserCach(); Session.Clear(); }
protected void imgbtnLogOut_onClick(object sender, ImageClickEventArgs e) { BUser.ClearUserCach(); FormsAuthentication.SignOut(); FormsAuthentication.RedirectToLoginPage(); }
void tlbLogout_ItemCommand(object sender, ToolBarItemEventArgs e) { BUser.ClearUserCach(); FormsAuthentication.SignOut(); FormsAuthentication.RedirectToLoginPage(); }
private static void LogOut() { BUser.ClearUserCach(); FormsAuthentication.SignOut(); FormsAuthentication.RedirectToLoginPage(); }