ASP Abandon Method

Session Object Reference Manual

Definition and Usage

The Abandon method terminates the user's session.

Note:When this method is called, the current Session object is not deleted until all scripts on the current page have been processed. This means that session variables can be accessed on the same page when Abandon is called, but they are not accessible from other web pages.

Syntax

Session.Abandon

Example

File1.asp:

<%
Session("name")="Hege"
Session.Abandon
Response.Write(Session("name"))
%>

Output:

Hege

File2.asp:

<%
Response.Write(Session("name"))
%>

Output:

(none)

Session Object Reference Manual