Refer to the Ad Rotator component to create an Ad Rotator object that automatically rotates the display of advertising images on a Web page. When a user opens or reloads a Web page every time
, the Ad Rotator component displays a new advertisement based on the information specified in the Rotator Schedule file.
You can record how many users click to access each ad by setting a URL parameter in the Rotator Schedule file to redirect the user to the redirected file
In If this parameter is specified, each time you jump to an advertiser's URL, it will be recorded in the WEB server's activity log. About Activity Day
Log for more information, see Logging Web site activity.
Filename
Adrot.dll Ad Rotator Component.
The redirected file is an optional file for redirection and allows the Ad Rotator component to record how many users click to access each AD.
Rotator Schedule File text file that contains the display plan and file information for the advertisement. This file must be available on a virtual path on the WEB server.
Grammar
Set AdRotator = Server.CreateObject ("MSWC. AdRotator ")
Parameters
AdRotator
Specifies the name of the AdRotator object created by calling Server.CreateObject.
Registry key
No.
Property
Border Specifies the size of the advertisement border.
Clickable Specifies whether the advertisement is a hyperlink.
TARGETFRAME Specifies the name of the frame that displays the advertisement.
Method
GetAdvertisement gets a detailed description of the next planned advertisement from the data file and formats it in HTML format.
Example
The following example displays a different advertisement each time the user views a Web page.
<% Set ad = Server.CreateObject ("MSWC. AdRotator ")%>
<%= AD. GetAdvertisement ("/ads/adrot.txt")%>
The following HTML is generated by the GetAdvertisement method and added to the output of the Web page to display the next advertisement in the Rotator Schedule file.
<a href= "http://www.msn.com/isapi/adredir.asp?http://www.company.com/" >
Height=60 border=1></a>