Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

HttpApplicationState.Add Method

Adds a new object to the HttpApplicationState collection.

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

public void Add(
	string name,
	Object value


Type: System.String

The name of the object to be added to the collection.

Type: System.Object

The value of the object.

The following example adds two application variables named MyAppVar1 and MyAppVar2 to the Application collection.

Application.Add("MyAppVar1", MyObject1);
Application.Add("MyAppVar2", MyObject2);  

.NET Framework

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