June 2002
Intermediate to advanced
816 pages
28h 12m
English
RemoveAll
Application.RemoveAll( )
Removes all items from the Application collection.
None
The example checks to ensure that at least one item is in the Application collection, and if it is, it clears the collection by calling the RemoveAll method.
Sub Page_Load( )
If Application.Count > 0 Then
Application.RemoveAll( )
Message.Text = "Application collection cleared."
Else
Message.Text = "Application collection is already empty."
End If
End SubThe RemoveAll method is provided for backwards compatibility with classic ASP. In classic ASP, this method was accessed through the Contents collection. In ASP.NET, this method can be accessed either directly, as shown above, or through the Contents collection.
Read now
Unlock full access