web 2.0

ASP Application.StaticObjects() - Application Object

ASP Application.StaticObjects() - Application Object Gets all objects declared by an <object> tag where the scope is set to “Application” within the ASP application.

ShotDev Focus:
- A collection of objects on the page.

Example

global.asa


<object runat="Server" scope="Application" id="SmartUpload" progid="aspSmartUpload.SmartUpload"></object>
<object runat="Server" scope="Application" id="Zip" progid="Pnvzip.ZipFunctions"></object>

asp_application_staticobjects.asp


<% Option Explicit %>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<%
Response.write Application.StaticObjects.Key("SmartUpload") & "<br>"
Response.write Application.StaticObjects.Key("Zip") & "<br>"

Response.write("<hr>")

Dim List
For Each List In Application.StaticObjects
Response.write(List & "<br>")
Next

Response.write("<hr>")

For List = 1 To Application.StaticObjects.Count
Response.write(Application.StaticObjects.Key(List)& "<br>")
Next
%>
</body>
</html>

Create a asp file and save to path root-path/myasp/

Run
http://localhost/myasp/asp_application_staticobjects.asp

Screenshot

ASP & Application.StaticObjects()

.
.
.

Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (1 votes, average: 1.00 out of 10)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.