一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

在ASP中使用Ad Rotator广告组件

时间:2008-01-12 编辑:简简单单 来源:一聚教程网

There are three parts to consider when using the Ad Rotator component.
The Rotator Schedule File
The instantiation of the AdRotator object itself within the web page where you want your banners rotated
The Redirection File
First - The Rotator Schedule File
This is the meat of the different banners and where they are sent when the graphic files are clicked.
There are two sections -
The first section lists the parameters that apply to all advertisement images in the rotation schedule,
line by line.
The first line is the name of the Redirection File.
The second line is the width of the graphic
The third line is the height of the graphics
The fourth Line is the border around the graphics - for a one pixel border, you would put 1, for no
border, put in 0
Example:
redirect Redirect.asp
Width 468
Height 60
Border 0
The second section must be separated from the first section, on a separate line, by an asterisk (*). This
section contains all the data for each of the graphics. For each banner/ad graphics, there are four lines.
First Line - the url of the graphic itself (http://www.whatever.com/grphics/MyFirstBanner.gif)
Second Line - the URL to where the viewer is redirected when he/she clicks on the banner. This can be a
dash (-) if there is no page to go to (though I couldn't wonder why you'd do this, IMHO)
Third line - the mouseover text that will appear
Fourth line - the weight of the graphic banner in respect to the others. According to Microsoft -
"For example, if a Rotator Schedule file contains three ads with impressions set to 2, 3, and 5, the first
advertisement is displayed 20 percent of the time, the second 30 percent of the time, and the third 50
percent of the time."
Once this page is finished, you must save it and name it. For this example, I have named mine 'adrot.txt'.
It doesn't have to be an ASP or HTML file....no headers are involved, just the plain text.

热门栏目