Methods of Session Object
Session object is a very useful helper to store and track information for web clients. When you've create a session object, a cookie will be sent to client's browser and thsi will be used to store data. Session object contains three methods: Abandon, Contents.Remove and RemoveAll
Abandon Method
This method deletes session. Stored information keeps in memory until all script page work. After reloading or browsing to another page, all data lost. So you may use this method on first line of page and can access over same scope.
<%
session("username") ="demo@demo"
session.abandon
.... blah blah .....
response.write session("username")
%>
Still we can call existing session here, but after browsing all data will be gone.
Contents.Remove & Contents.RemoveAll
Simply this method deletes an/all item(s) from the contents collection. Similiar usage can be used for Application object.
<%
session("username") ="demo@demo"
Session.Contents.Remove("username")%>
Using RemoveAll method we can delete more than one session variable.
<%
Session.Contents.RemoveAll()
%>



