3
Answers

code for logout button?

ajay raju

ajay raju

14y
9.9k
1

hi,
   i am place Logout button in my web form user click logout button that time he goes to login page. i am write code like
 
 Sessio["username"] == null;
 Session.Abandom();
 Response.Redirect("login.aspx");
in this code it is Redirect to login page, but my problem is when i click back arrow button of browser it goes to the previous pages.
please give a solution for after click logout button when i click
back arrow button of browser, it only display a login page, any times
click back arrow button of browser it display only login page and not
goes to any another pages.
  Please give a solution for this.
Thanks.
Answers (3)