Learnthat.com Free Certification and Computer Online Courses
ThatNetwork.com Internet Media Network Givethat.com free gift ideas Definethat.com - Free technical definitions, define Free Romance Tips, Romantic Tips, Date Ideas Free POD publisher comparison print on demand
Learnthat.com Free A+ Certification, Computer Classes, Certification Courses, Business, Lifestyle, ApplicationsFree business tutorials and definitionsFree certification tutorials and definitionsFree computer and technical tutorials and technical definitionsFree Finance Tutorials and DefinitionsFree House Repair TutorialsFree Lifestyle and Fun Tutorials
  All Online CoursesNew Courses QuickTipsWord DefinitionsSubmit a TutorialLinks
÷ Resources
Home
free tech tutorials
Free Tutorials
free tech tutorials
Certifications
free tech tutorials
Definitions
free tech tutorials
Resources/Links
free tech tutorials
Forums
free tech tutorials
Distance Education
free tech tutorials
Highest Rated Tutorials
÷ Popular Tutorials
÷ New Tutorials

Active Server Pages (ASP)

 

Creating Objects

You can declare an object in the Global.asa file that will be used by multiple pages in the application. To do so, use the <OBJECT> </OBJECT> tags:

<SCRIPT LANGUAGE="VBScript" RUNAT="Server">

Sub Application_OnStart

Application("AppName")="Holiday Tips "

Application("Holiday")="Valentine's Day"

End Sub

Sub Application_OnEnd

Application("Holiday")=""

End Sub

</SCRIPT>

<OBJECT RUNAT="Server" SCOPE=Session ID=Ad1 PROGID="MSWC.AdRotator">

</OBJECT>

The RUNAT attribute again specifies that the object should be created on the server. The SCOPE attribute specifies whether the object is session- or application-level. The ID attribute lets you name the object; you can then use this name to access the object from within your ASP pages.

The PROGID and CLASSID attributes specify the unique identifier for the type of object being created. You must include one of these. If you're creating an ActiveX object, for example, you can use the CLASSID attribute, which specifies a string value that uniquely identifies the component.

To access the object from a page in the application, simply precede the name with the equal sign (=):

<HTML>

<BODY>

<%=Ad1.GetAdvertisement("/ecards.txt")%>

</BODY>

</HTML>

 

 

by Summer Doucet

Find more free Internet tutorials from Learnthat.com.

More Information:

Help us by rating this tutorial: [---] [--] [+] [++] [+++]
[---] lowest; [+++] highest

 

 

 


Learn: Free Tutorials - Links to Free Tutorials
Understand: Free Technical Definitions - ExplainThat Whitepapers
Use: Certification Section - Discussion Forum

Visit Our Network Sites:

DefineThat.com Technical Defintions Romancetips.com
Free Gift Ideas - GiveThat Planthat.com Free Unique Business Ideas
PublishOnDemand.net - Learn about Print on Demand (POD) - Self Publishing Seekthat.com - Technical Search Engine
ThatNetwork.com  

About Us : Contact Us : Advertise : Privacy Information

© 1998-2004 Learnthat.com