
Keys | 281
Application
Class
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Notes
This property provides a list of key names assigned to all current Application
variables.
Contents
HttpApplicationState = Application.Contents
Returns a reference to the current HttpApplicationState instance.
Parameter
HttpApplicationState
A variable of type HttpApplicaitonState that will receive the Contents
reference.
Example
The example below calls the RemoveAll method through the Contents collection
reference and then writes a message:
Sub Page_Load( )
Application.Contents.RemoveAll( )
Message.Text = "Removed all items from current Application."
End Sub
Notes
This property is provided for backward compatibility with classic ASP. Properties
such as the Item property and methods such as Remove and RemoveAll were
accessed via the Contents property in classic ASP. In new ASP.NET development,
you should access these members directly. For example, instead of calling the
RemoveAll method through the Contents property, you can call RemoveAll
method directly:
Application.RemoveAll( )
Keys
KeysCollection = Application.Keys
Returns a NameObjectCollectionBase.KeysCollection containing the string keys
associated with all values stored in the Application collection.
Parameter
KeysCollection
A variable of type NameObjectCollectionBase.KeysCollection that will
receive the Keys property ...