June 2002
Intermediate to advanced
816 pages
28h 12m
English
Contents
HttpApplicationState = Application.Contents
Returns a reference to the current HttpApplicationState instance.
HttpApplicationState
A variable of type HttpApplicaitonState that will receive the Contents reference.
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
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( )
Read now
Unlock full access