please dont rip this site

<OBJECT> Declarations

You can create objects with session or application scope in the Global.asa file by using the extended <OBJECT> tag. This tag is self-contained and is outside of any <SCRIPT> tags.

The objects declared in the Global.asa file are not created until the server processes a script that references that object. This saves resources by creating only the objects that are needed.

Note The server does not call the OnStartPage and OnEndPage methods for objects created with application scope.

Syntax

<OBJECT RUNAT=Server SCOPE=Scope ID=Identifier {PROGID="progID"|CLASSID="ClassID"}>
. . .

</OBJECT>

Parameters

Scope

Specifies the scope of the object. In the Global.asa file, Scope will be either "Session" or "Application."

Identifier

Specifies a name for the object instance.

ProgID

An identifier associated with a class identifier. Either ProgID or ClassID must be specified in the <OBJECT> tag. The format for ProgID is [Vendor.]Component[.Version].

ClassID

Specifies a unique identifier for an OLE class object. Either ProgID or ClassID must be specified in the <OBJECT> tag.

Examples

The first of the following examples creates an object of session scope named MyConnection by using the ProgID parameter. The second example uses the ClassID parameter.

<OBJECT RUNAT=Server SCOPE=Session ID=MyConnection 
PROGID="ADODB.Connection"> REM Object Script </OBJECT> <OBJECT RUNAT=Server SCOPE=Session ID=MyConnection
CLASSID="Clsid:8AD3067A-B3FC-11CF-A560-00A0C9081C21"> REM Object Script </OBJECT>

Remarks

The objects declared in the Global.asa file can be used by any script in the application. For example, if you declared the following object:

---GLOBAL.ASA---
<OBJECT RUNAT=Server SCOPE=Session ID=MyAd PROGID="MSWC.AdRotator">
</OBJECT>
 

You could reference the object MyAd from any page in the application:

---SOME.ASP---
<%= MyAd.GetAdvertisement("/ads/adrot.txt") %>  
 


© Microsoft Corporation. All rights reserved.


file: /Techref/language/asp/obj/global_7.htm, 3KB, , updated: 2005/7/17 05:25, local time: 2024/11/30 15:13,
TOP NEW HELP FIND: 
18.118.32.7:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://ecomorder.com/techref/language/asp/obj/global_7.htm"> &lt;OBJECT&gt; Declarations</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to ecomorder.com!

 

Welcome to ecomorder.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .