ASP Tutorials - Herong's Tutorial Examples
Dr. Herong Yang, Version 5.00

"application" Object - Sharing Data within an Application

This section provides a tutorial example on how to use the 'application' object provided by the ASP programming interface to share data within an application.

application: An object provided by the server to hold information and methods common to all sessions related to one virtual directory.

  • Contents: A collection object acting an cache for ASP pages from different sessions to share information. Since "Contents" is the default collection, we write 'application.Contents("myVar")' as 'application("myVar")'.
  • Lock(): A method to lock the application object for synchronization.
  • UnLock(): A method to unlock the application object for synchronization.
  • OnStart(): An event handler to be called when the first HTTP request comes to this virtual directory.
  • OnEnd(): An event handler to be called the server wants to terminate the service on this virtual directory.
  • Buffer: A Boolean property indicating whether to buffer the page until the contents are completed.
  • Charset: A property representing the character set name in HTTP response header.
  • ContentType: A property representing the content type name in the HTTP response header.
  • Expires: A property representing the period of time before the page cached on a proxy server expires.
  • IsClientConnected: A Boolean property indicating whether the browser has disconnected from the server.
  • Status: A property representing the status in the HTTP response header.

Last update: 2002.

Table of Contents

 About This Book

 ASP (Active Server Pages) Introduction

 IIS (Internet Information Services) 5.0

 MS Script Debugger

 VBScript Language

ASP Built-in Run-time Objects

 Introduction of ASP Objects

 "request" Object - Receiving Data from Client

 "response" Object - Sending Data to Client

 "server" Object - Sharing Data across Applications

"application" Object - Sharing Data within an Application

 "session" Object - Sharing Data across ASP Pages

 ASP Session

 Creating and Managing Cookies

 Managing Sessions with and without Cookies

 scrrun.dll - Scripting Runtime DLL

 Managing Response Header Lines

 Calculation Speed and Response Time

 ADO (ActiveX Data Object) DLL

 Working with MS Access Database

 Guest Book Application Example

 References

 PDF Printing Version

Dr. Herong Yang, updated in 2010
"application" Object - Sharing Data within an Application