ASP AdRotator Component
The AdRotator component creates an AdRotator object that displays a different advertisement, each time a user enters or refreshes a page. It allows an ASP page to display a different graphic each time this page is referenced from a browser. This technique is often used in sites that display advertisements. AdRotator component is used to display a series of images, as well as to provide a link from the displayed image to another URL.
AdRotator Component Method
GetAdvertisement
The GetAdvertisement method is used to manage and retrieve information from Ad Rotator Component.
Syntax:
GetAdvertisement (ScheduleFilePath)
Example:
<%
set adrot=Server.CreateObject(\"MSWC.AdRotator\")
Response.Write(adrot.GetAdvertisement(\"ads.txt\"))
%>
|
AdRotator Component Properties
Border Property: The border property specifies the size of the borders around the advertisement.
Syntax:
Border (size)
Example:
<%
set adrot=Server.CreateObject(\"MSWC.AdRotator\")
adrot.Border=\"2\"
Response.Write(adrot.GetAdvertisement(\"ads.txt\"))
%>
|
Clickable Property: The Clickable Property specifies whether the advertisement is a hyperlink or simply a random image.
Syntax:
Clickable (Value)
Where value is True or False
Example:
<%
set adrot=Server.CreateObject(\"MSWC.AdRotator\")
adrot.Clickable=false
Response.Write(adrot.GetAdvertisement(\"ads.txt\"))
%>
|
TargetFrame: The TargetFrame is used to display the Name of the frame in which the AdRotator object is displayed.
Syntax:
TargetFrame (frame)
Where frame is the name of an HTML frame
Example:
<%
set adrot=Server.CreateObject(\"MSWC.AdRotator\")
adrot.TargetFrame=\"target=\'_blank\'\"
Response.Write(adrot.GetAdvertisement(\"ads.txt\"))
%>
|