Click here to Skip to main content
15,881,733 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I am facing a problem in .net history clearance. The scenario is

I am currently logging into gmail and seeing my mail. Now i type the Yahoo URL in the address bar. The site get launched. Again i changed the URL to gmail.com. now i can see my mail without giving Username and Password.

what i need is i need to sign out from gmail when i type some other site in the URL
Posted

Refer 5 steps to delete history:
How to Delete History in ASP.NET[^]
 
Share this answer
 
Comments
Manas Bhardwaj 6-Jul-12 7:12am    
good +5!
Prasad_Kulkarni 6-Jul-12 7:46am    
Thank you Manas!
you need to destroy the session, if you you are storing your UserName and Password into session.
On LogOut button Click event Write following code:
C#
Session.Abandon();


i hope it will help you.

best of luck.
 
Share this answer
 
Comments
Manas Bhardwaj 6-Jul-12 7:13am    
right +5!
Well, that has nothing to do with history. You need to manage the state of your application properly. You can try to play with onbeforeunload [^]event.

Create a session variable which keeps your login state. Hook a webservice call to onbeforeunload event, which would clear the session information once you navigate to any other url.

Hope this helps!
 
Share this answer
 
Comments
Prasad_Kulkarni 6-Jul-12 7:46am    
My 5!
Click on 'logout' button before navigating to any other site.. That's all....It is what Gmail gave you the logout button...If you do not use it, GMail is not at fault...
 
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