Export (0) Print
Expand All

HttpApplicationState.Contents Property

Gets a reference to the HttpApplicationState object.

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

public HttpApplicationState Contents { get; }

Property Value

Type: System.Web.HttpApplicationState
A reference to the HttpApplicationState object.

This property provides compatibility with earlier versions of ASP.

The following example creates a new HttpApplicationState object that is used to access the object names in the application state collection.


HttpApplicationState AppState2;

AppState2 = Application.Contents;

String[] StateVars = new String[AppState2.Count];
StateVars = AppState2.AllKeys;

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
Show:
© 2015 Microsoft