You can create an AdRotator object using the ASP AdRotator component that displays a different image each time a user enters or refreshes a page.
A text file includes information about the images.
A D V E R T I S E M E N T
ASP AdRotator Component
You can create an AdRotator object using the ASP AdRotator component that displays a different image each time a user enters or refreshes a page. A text file includes information about the images..
Syntax
<%
set adrotator=server.createobject("MSWC.AdRotator")
adrotator.GetAdvertisement("textfile.txt")
%>
Example
Assume we have a file called "TopBanners.asp". It looks like this:
<html>
<body>
<%
set adrotator=Server.CreateObject("MSWC.AdRotator")
response.write(adrotator.GetAdvertisement("ads.txt"))
%>
</body>
</html>
The lines below the asterisk in the file "ads.txt" specifies
the images to be displayed, the hyperlink addresses, the
alternate text (for the images), and the display rates in
percent of the hits. We see that the academictutorials image will be
displayed for 80 % of the hits and the vyom image will be
displayed for 20 % of the hits in the text file above.
Note: To get the links to work when a user clicks on them,
we will have to modify the file "ads.txt" a bit: