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
Available since 1.1
Return to top