Quantcast
Channel: In ASP.NET, when should I use Session.Clear() rather than Session.Abandon()? - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Answer by Kasim Shafiq for In ASP.NET, when should I use Session.Clear() rather than Session.Abandon()?

$
0
0

Session.Abandon destroys the session as stated above so you should use this when logging someone out. I think a good use of Session.Clear would be for a shopping basket on an ecommerce website. That way the basket gets cleared without logging out the user.


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>