I am working on the bus ticket reservation system. I have developed all the login scenarios for all actors on role base access. All the actors login via login page and login page redirects them to their permitted home pages. Now the user session has get started and after completing the required tasks, presses logout button and this logout button does:
Session.Abandon();
Response.Redirect("default.aspx");
After that, the user is on default login page but when the user presses the browser back button the same home page remains showing in the window until he or she refresh the home page manually. home page code is:
if(Session["user"] != null)
{
//welcome user
}
else
{
Response.Redirect("../Default.aspx");
}
I want to refresh the home page on pressing browser back button that the user no longer see the page after the logout. how we can do this work in c# .net?