Export (0) Print
Expand All

SessionStateItemCollection Class

A collection of objects stored in session state. This class cannot be inherited.

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

public ref class SessionStateItemCollection sealed : public NameObjectCollectionBase, ISessionStateItemCollection, ICollection, IEnumerable
public final class SessionStateItemCollection extends NameObjectCollectionBase implements ISessionStateItemCollection, ICollection, 
	IEnumerable
public final class SessionStateItemCollection extends NameObjectCollectionBase implements ISessionStateItemCollection, ICollection, 
	IEnumerable
Not applicable.

The SessionStateItemCollection class is used to manage session-state variable values indexed by a variable name or by numerical index. The session-state variables are exposed to ASP.NET application code using the HttpSessionState class, which is accessed using the Session property of the current HttpContext or the Page. The HttpSessionState class calls the HttpSessionStateContainer class, which manages session-state variable values using the SessionStateItemCollection.

Notes to Implementers: When you create a custom session-state provider based on the SessionStateStoreProviderBase class, use the SessionStateItemCollection class to manage the items stored in session state. If you need to create a custom object to manage session-state items, implement the ISessionStateItemCollection interface.

The following code example creates a new SessionStateItemCollection object and sets and gets values in the collection by name.

No code example is currently available or this language may not be supported.

System.Object
   System.Collections.Specialized.NameObjectCollectionBase
    System.Web.SessionState.SessionStateItemCollection

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft