Logo Head Picture  free e- mail 
 thaimail 
 hotmail 
 yahoo 
 siam2you 
 thammasat
 Home  Visual Basic Active Server Page  JavaScript   Network   Other 
 Active Server Pages.











COLLECTION PROPERTY:  Application.Contents

Application.Contents(Key)

The Contents collection property contains a list of the items that have been created and added to the Application object. Objects can be added to the collection by using Server.CreateObject or by assigning scalar variables.

You can iterate through a collection using a For Each item in ... Next loop.

There is one mandatory argument.

Key

The Key argument is the name of the item to be retrieved.

Code:
<%
Application("name") = "Application Maker"
Application("publishdate") = "05/15/01"
Application("author") = "DevGuru"
Set Application("Obj1") = Server.CreateObject("ADODB.Connection")
 
For Each Item in Application.Contents
    If IsObject(Application.Contents(Item)) Then
      Response.Write Item & " is an object.<BR>"
    Else
      Response.Write Item & "=" & Application.Contents(Item) & "<BR>"
    End If
Next
%>

 
Output:
name=Application Maker
publishdate=05/15/01
author=DevGuru
OBJ1 is an object.

Copyright 2000 by Infinite Software Solutions, Inc.
Trademark Information

ASP - Link
ASP reference   
B   
C   
D   
E   
F   
G   
Last update: Copyright © 2001.Memo Wil@keo everything that I like Co.,Ltd.