GetAdvertisement

The GetAdvertisement method retrieves the next advertisement from the Rotator Schedule file. Each time the script is run, such as when a user opens or refreshes a page, the method retrieves the next scheduled advertisement.

Syntax

GetAdvertisement(rotationSchedulePath) 
 

Parameters

rotationSchedulePath
Specifies the location of the Rotator Schedule file relative to the virtual directory. For example, if the physical path was C:\Inetpub\Wwwroot\Ads\Adrot.txt (where Wwwroot is the "/" virtual directory) you would specify the path \Ads\Adrot.txt.

Return Values

Returns HTML that displays the advertisement in the current page.

Example

The following example gets an advertisement from the Adrot.txt file in the /Ads/ virtual directory.

<% Set NextAd = Server.CreateObject("MSWC.AdRotator") %>
<%= NextAd.GetAdvertisement("/ads/adrot.txt") %> 
 

Applies To

Ad Rotator Component