This documentation is archived and is not being maintained.

HttpSessionState Members

Provides access to session-state values as well as session-level settings and lifetime management methods.

The HttpSessionState type exposes the following members.

  NameDescription
Public method Abandon Cancels the current session.
Public method Add Adds a new item to the session-state collection.
Public method Clear Removes all keys and values from the session-state collection.
Public method CopyTo Copies the collection of session-state values to a one-dimensional array, starting at the specified index in the array.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetEnumerator Returns an enumerator that can be used to read all the session-state variable names in the current session.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Remove Deletes an item from the session-state collection.
Public method RemoveAll Removes all keys and values from the session-state collection.
Public method RemoveAt Deletes an item at a specified index from the session-state collection.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public Extension Method AsQueryable Converts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension Method Cast Converts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension Method OfType Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)
Top

  NameDescription
Public property CodePage Gets or sets the character-set identifier for the current session.
Public property Contents Gets a reference to the current session-state object.
Public property CookieMode Gets a value that indicates whether the application is configured for cookieless sessions.
Public property Count Gets the number of items in the session-state collection.
Public property IsCookieless Gets a value indicating whether the session ID is embedded in the URL or stored in an HTTP cookie.
Public property IsNewSession Gets a value indicating whether the session was created with the current request.
Public property IsReadOnly Gets a value indicating whether the session is read-only.
Public property IsSynchronized Gets a value indicating whether access to the collection of session-state values is synchronized (thread safe).
Public property Item Overloaded. Gets or sets individual session values.
Public property Keys Gets a collection of the keys for all values stored in the session-state collection.
Public property LCID Gets or sets the locale identifier (LCID) of the current session.
Public property Mode Gets the current session-state mode.
Public property SessionID Gets the unique identifier for the session.
Public property StaticObjects Gets a collection of objects declared by <object Runat="Server" Scope="Session"/> tags within the ASP.NET application file Global.asax.
Public property SyncRoot Gets an object that can be used to synchronize access to the collection of session-state values.
Public property Timeout Gets and sets the amount of time, in minutes, allowed between requests before the session-state provider terminates the session.
Top
Show: