Click here to Skip to main content
15,896,915 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a website in .net c#, the user can open multiple tabs and work on it. On click of Logout Button the user must be logged out from all the pages opened in different tab. And all the tabs should be redirected to Login Page.
Posted
Comments
Kornfeld Eliyahu Peter 19-Oct-15 7:16am    
It is a fairly logical request...What is your question?

You can't manipulate the state of other tabs from your server code so there is no real way of doing this. Neither can you stop people using multiple tabs. If the user wants to open multiple tabs for the same site they have to logout\close each tab too.
 
Share this answer
 
Hello ,

You can try with below code . Write this code in your logout button click event.
C#
FormsAuthentication.SignOut();
        Roles.DeleteCookie();
        Response.Redirect(Request.Path);
        FormsAuthentication.RedirectToLoginPage("Login");
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900