When a user logs into the website, it’s a good practice to create a new session to track the user activities. So, meantime we need to handle log out scenario as well. So, we will kill a user session once user logs out of the application. Below is the code snippet that can be written to kill the user session –Session.Abandon();
Session.Abandon();
There Are 3 ways to Destroy SessionSession.Abandon(); Session.Clear(); Session.RemoveAll();
there are three way to use kill the session in asp.net 1. Session.Abandon(); 2. Session.Clear(); 3. Session.RemoveAll();
You can use Session.Abandon(); or Session.Clear();