session
how to kill session automatically when browser closed?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
aditya immadiPosted Mar 28, 2016, 12:46 PM
Rohit ManePosted Mar 28, 2016, 10:18 AM
1. First create a page LogOut.aspx and in
Page_Loadevent, write this code:protected void Page_Load(object sender, EventArgs e) { Session.Abandon(); }2. Then add the following JavaScript code in your page or Master Page:
3. Add the following code in the
bodytag of master page:Finally the code in Master page like this: