HttpSessionState.Contents Property

 

Gets a reference to the current session-state object.

Namespace:   System.Web.SessionState
Assembly:  System.Web (in System.Web.dll)

Public ReadOnly Property Contents As HttpSessionState

The Contents property is provided for compatibility with earlier versions of ASP.

The following code example lists the item names and values in the Contents property.

For Each s As String In Session.Contents
  Response.Write(String.Format("{0} = {1}<br />", s, Session(s)))
Next

.NET Framework
Available since 1.1
Return to top
Show: