The ASP Contents Collection is used for collecting the items which are appended to the Application object by using script command. This Collection can also be used to provide a list of items that have been given application scope,
The Contents.Remove and Contents.RemoveAll methods can be used to remove some or all of the items from the collection.
- Key: It contains a single value i.e Key which represents the name of the items.
Example 1: We use to add names and objects that would be added to the contents collections.
<% Application("name")="GeeksForGeeks" Set Application("objtest")=Server.CreateObject("ADODB.Connection") %>
<% Application("author")="GeeksforGeeks" Application("Contributors")="Rahul Jain" for each x in Application.Contents Response.Write(x & "=" & Application.Contents(x) & "<br>") next %>
author=GeeksforGeeks Contributors=Rahul Jain