优秀的软件开发团队:深圳升蓝软件 数据库开发 .Net技术  |  ASP技术 PHP技术 JSP技术 应用技术类     
热门推荐
升蓝OA办公自动化系统
基于.Net技术的网络
协同办公环境
 
ASP基础
数据库相关
安全加密
全文检索
ASP应用
打印相关
客户端相关
XML相关
系统相关
正则表达式
ASP技巧
组件开发
脚本编码
FSO专题
邮件相关
远程脚本
性能优化
 
相关链接
深圳升蓝软件:系统集成、办公自动化平台、电子商务、电子政务、Web数据库、企业网站、游戏、手机应用程序、CDMA软件、电子出版物等,为客户提供优秀的解决方案
 
升蓝(www.hi-blue.com)为企业管理、政府办公提供成熟的、易于实施的IT技术服务,我们的解决方案包括OA办公自动化系统CRM客户关系管理系统ERP企业生产管理和订单管理系统电子政务系统、知识管理系统、企业门户、商业智能、工程项目管理等等...
 
电子政务解决方案
塑料/橡胶管理系统
知识管理系统简介
多媒体光盘方案
ERP企业资源管理
订单计划管理系统
PM工程项目管理系统
会员管理系统
相关资料下载
OA办公自动化系统
CRM客户关系管理系统
在线试用版本说明
OA 系统的用户手册
 
 
 
 
升蓝开发团队 > 技术资料 > ASP技术 > 全文检索 : 在ASP中使用Ad Rotator广告组件

在ASP中使用Ad Rotator广告组件


March 25,2004
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.



--------------------------------------------------------------------------------
Second - Instantiate the object in the ASP page:
<% Dim MyAd
Set MyAd = Server.CreateObject("MSWC.AdRotator")%>
<% =MyAd.GetAdvertisement("/adrot.txt") %>
You can put HTML Centers around this section of code to center it on the page.



--------------------------------------------------------------------------------
Now, there's one last part - the Redirection file. Above, you will notice that, in this example, I called
it Redirect.asp. You can call it anything you want - it doesn't matter what it's called.
On that page all you need is the following code:
<% Response.Redirect(Request.QueryString("url")) %>
Just remember, if you have created a new page with a program that includes all the HTML basic markup and
you put this line in the file, you must put the following line as the first line of the file so it will
work:

<% Response.Buffer= true%>

And that's it - that's all it takes to get the Ad Rotator Component working.
数据库开发 | .Net技术 | ASP技术 | PHP技术 | JSP技术 | 应用技术类 | 升蓝开发小组
Copyright ? 2001-2004 Shenzhen Hi-blue Software Team 升蓝开发小组 All rights reserved