SessionStateItemCollection.Item Property (String)

 

Gets or sets a value in the collection by name.

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

abstract Item : 
        name:string -> Object with get, set
override Item : 
        name:string -> Object with get, set

Parameters

name
Type: System.String

The key name of the value in the collection.

Property Value

Type: System.Object

The value in the collection with the specified name. If the specified key is not found, attempting to get it returns null, and attempting to set it creates a new element using the specified key.

The following code example sets and gets values in a SessionStateItemCollection collection by name.

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

.NET Framework
Available since 2.0
Return to top
Show: