IHttpSessionState.Item Property (String)


Gets or sets a session-state item value by name.

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

object this[
	string name
] { get; set; }


Type: System.String

The key name of the session-state item value.

Property Value

Type: System.Object

The session-state item value specified in the name parameter.

The following code example implements the Item property of the IHttpSessionState interface to store and return an internal dictionary session-state item value by its key name.

public object this[string name]
  get { return pSessionItems[name]; }
  set { pSessionItems[name] = value; }

.NET Framework
Available since 2.0
Return to top