This documentation is archived and is not being maintained.
HttpApplicationState.Add Method
.NET Framework 1.1
Adds a new object to the HttpApplicationState collection.
[Visual Basic] Public Sub Add( _ ByVal name As String, _ ByVal value As Object _ ) [C#] public void Add( string name, object value ); [C++] public: void Add( String* name, Object* value ); [JScript] public function Add( name : String, value : Object );
Parameters
- name
- The name of the object to be added to the collection.
- value
- The value of the object.
Example
The following example adds two application variables named MyAppVar1 and MyAppVar2 to the Application collection.
[Visual Basic] Application.Add("MyAppVar1", MyObject1) Application.Add("MyAppVar2", MyObject2) [C#] Application.Add("MyAppVar1", MyObject1); Application.Add("MyAppVar2", MyObject2); [C++] Application->Add(S"MyAppVar1", MyObject1); Application->Add(S"MyAppVar2", MyObject2); [JScript] Application.Add("MyAppVar1", MyObject1) Application.Add("MyAppVar2", MyObject2)
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
HttpApplicationState Class | HttpApplicationState Members | System.Web Namespace
Show: