Low cost ecommerce web development India flash website design
The Application object
The Application object can store information that persists for the entire
lifetime of an application (a group of pages with a common root). Generally,
this is the whole time that the IIS server is running. This makes it a great
place to store information that has to exist for more than one user (such as a
page counter). The downside of this is that since this object isn't created anew
for each user, errors that may not show up when the code is called once may
show up when it is called 10,000 times in a row. In addition, because the
Application object is shared by all the users, threading can be a nightmare to
implement.
You can use the Application object to share information among all users of a
given application. An ASP-based application is defined as all the .asp files in
a virtual directory and its subdirectories. Because the Application object can
be shared by more than one user, there are Lock and Unlock methods to
ensure that multiple users do not try to alter a property simultaneously.
30
Syntax
Application.method
Collections
Contents
Contains all of the items that have been added to the Application through
script commands.
StaticObjects
Contains all of the objects added to the session with the <OBJECT> tag.
Lock
The Lock method prevents other clients from modifying Application object
properties.
Unlock
The Unlock method allows other clients to modify Application object
properties.
Events
Application_OnEnd
Application_OnStart
Scripts for the preceding events are declared in the global.asa file. For more
information about these events and the global.asa file, see the Global.asa
Reference.
Remarks
You can store values in the Application Collections. Information stored in the
Application collections is available throughout the application and has
application scope.
31
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73