Page

A.1.0- The Application Object

  by NT Community Manager.
Last Updated  by NT Community Manager.  

PublicCategorized as Appendix A.

Not tagged.
<< A.0.0- The ASP 3.0 Object ModelAppendixAA.2.0- The ASPError Object >>

The Application Object

The Application object is created when the ASP DLL is loadedin response to the first request for an ASP page. It provides a repository forstoring variables and object references that are available to all the pagesthat all visitors open.

 

Collection

Description

Contents

A collection of all of the variables and their values that are stored in the Application object, and are not defined using an <OBJECT> element. This includes Variant arrays and Variant-type object instance references.

StaticObjects

A collection of all of the variables that are stored in the Application object by using an <OBJECT> element.

 

Method

Description

Contents.Remove
    
("
variable_name")

Removes a named variable from the Application.Contents collection.

Contents.RemoveAll()

Removes all variables from the Application.Contents collection.

Lock()

Locks the Application object so that only the current ASP page has access to the contents. Used to ensure that concurrency issues do not corrupt the contents by allowing two users to simultaneously read and update the values.

Unlock()

Releases this ASP page's lock on the Application object.

* You cannot remove variables from the Application.StaticObjects collection at run-time.

 

Event

Description

onStart

Occurs with the first instance of a user requesting one of the web pages in the application, before the page that the user requests is executed. Used to initialize variables, create objects, or run other code.

onEnd

Occurs when the ASP application ends, that is, when the web server shuts down. This is after the last user session has ended, and after any code in the onEnd event for that session has executed. All variables existing in the application are destroyed when it ends.

<< A.0.0- The ASP 3.0 Object ModelAppendixAA.2.0- The ASPError Object >>

Copyright © 2003 by Wiley Publishing, Inc.

Powered by Near-TimeTerms of Services | Privacy Policy | Security Policy |