ASP » Session » Abandon

Syntax:
Session.Abandon

The Abandon method terminates a user session, destroys all data and objects in the current Session object, and releases its resources.

The Abandon method terminates a user session, destroys all the objects in the current Session object, and releases its resources. However, this deletion will not occur until all of the script is processed for the current page. When the session ends, the OnEnd event handler is called. By default, even if you do not call Abandon, the Session object is terminated after twenty minutes of idle time.

Examples

Code:
----------------File1.asp-------------------
<%
Response.Write "Your SessionID is " & Session.SessionID
Session("Application") = "DevSite"
Session.Abandon
Response.Write "The Application name is " & Session("Application")
%>
 
----------------File2.asp---------------------
<%
Response.Write "Your SessionID is " & Session.SessionID
%>
Output:
------------File1.asp-------------------------
Your SessionID is 465107831
The Application name is DevSite
 
-----------File2.asp--------------------------
Your SessionID is 465107831