O'Reilly logo

VBScript in a Nutshell by Ron Petrusha, Paul Lomax, Matt Childs

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Active Server Pages Object Model

Although VBScript is a powerful, flexible scripting language when used to develop ASP applications, you can do relatively little with VBScript by itself. That is, most of the power and efficiency of ASP becomes available only when you use VBScript to access the Active Server Pages object model. In an ASP application, each of the objects in the ASP object model is globally available throughout your script; you don’t have to do anything special to instantiate ASP objects.

ASP includes six intrinsic objects, each of which are detailed in the following sections.

Application

An object whose collections and property values are shared across all instances of the application. (An ASP application , once again, is the entire set of files that can be accessed in a virtual directory and its subdirectories.) The Application object supports the members listing in Table 5.1.

Table 5-1. Members of the Application Object

Name

Description

Contents Collection

Contains all application-scoped variables and objects added by script.

Lock Method

Locks the Contents collection, preventing other instances from accessing it until it is unlocked. Its syntax is Application.Lock( ).

OnEnd Event

Fired when the last user session ends.

OnStart Event

Fired when the first user session starts.

StaticObjects Collection

Contains all application-scoped variables added by the <OBJECT> tag.

Unlock Method

Unlocks the Contents collection so that other instances can access ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required