Sun
ONE Active Server Pages Product Home Page Developer Site Version
 

ContentsPreviousNextIndex



Example: ASP Session Object Contents.Remove Method

The following code includes members of the Session.Contents collection:

<%
Set Session("ASPAdRotator") = Server.CreateObject("MSWC.AdRotator")
Session("strHello") = "Hello"
Session("Start_Time") = CStr(Now)
%>

The following code removes the second item in the collection ("strHello") using an integer.

<%
Session.Contents.Remove(2)
%>

The following code removes the second item in the collection ("strHello") using the variable name.

<%
Session.Contents.Remove("strHello")
%>


ContentsPreviousNextIndex