please dont rip this site
Platform SDK: IIS SDK
      [IIS 5.0] [IIS 5.1] [IIS 6.0]

Session.Contents Collection

The Session.Contents collection contains all of the items that have been established for a session without using the <OBJECT> tag. The collection can be used to determine the value of a specific session item, or to iterate through the collection and retrieve a list of all items in the session.


Session.Contents( Key)


The name of the property to retrieve.


You can use an iterating control structure to loop through the keys of the Contents collection, as demonstrated in the following example:



  Dim sessitem

  Dim anArray(2)

  response.write "SessionID: " & Session.SessionID & "<P>"






  set objConn=server.createobject("adodb.connection")

  set Session("object")=objConn

  response.write "List of " & Session.Contents.Count & " items in Session

  contents collection:<HR>"

  For Each sessitem in Session.Contents

    If IsObject(Session.Contents(sessitem)) Then

      Response.write(sessitem & " : Session object cannot be displayed." & "<BR>")


      If IsArray(Session.Contents(sessitem)) Then

         Response.write "Array named " & Session.Content(sessitem) & "<ol>"

         For each objArray in Session.Contents(sessitem)

             Response.write "<li>" & _

             Session.Contents(sessitem)(objArray)& "<BR>"


             Response.write "</ol>"


             Response.write(sessitem & " : " & Session.Contents(sessitem) & "<BR>")

       End If

    End If




Platforms: Windows 2000 with IIS 5.0 installed, Windows XP with IIS 5.1 installed, Windows Server 2003 family with IIS 6.0 installed

Platform SDK Release: February 2003
What did you think of this topic?
Order a Platform SDK CD

file: /Techref/language/asp/OBJ/ref_vbom_sesoccon.htm, 3KB, , updated: 2003/5/15 14:13, local time: 2024/6/18 09:14,

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF=""> Session.Contents Collection</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.

Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

  PICList 2024 contributors:
o List host: MIT, Site host, Top posters @none found
- Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.

Welcome to!