• ----:)欢迎访问源码网(:----
    • 首页
    • 博客
    • 学院
    • 下载
    • 论坛
    • 影视
    • 发布源码
    • RSS
    • ITPig
    • 笑话网
    • 百家姓
    • 繁體中文

源码网 - 中国第一源码门户
选择镜像:网通镜像 - 电信主站
  • 首 页
  • 新闻动态
  • 网站运营
  • 网页制作
  • WEB开发
  • 编程开发
  • 图像媒体
  • 操作系统
  • 数据库
  • 服务器
热门搜索 优化 SEO 故事 cms IIS7 MySQL 个人 AdSense 主题推广 | 文章搜索: 高级搜索
会员登录/控制面版您的位置: 学院首页 >> WEB开发 >> ASP开发 >> 全文检索 >> 详细内容
 

推荐文章

 
 

热点文章

  • Microsoft SQL Server 全文索引服务
  • Counters 组件参考
  • ASP定时组件
  • 用asp怎样编写文档搜索页面
  • 设置服务器日期时间组件
  • 使用组件搜索
  • Dns组件的一些用法
  • ASP Image 使用范例
  • 用ASP建立站内搜索
  • ASP Chart 使用范例
  • Ad Rotator组件使用例子
  • FileSystemobject组件
 
 

相关文章

  • 用ASP生成Chart
  • 使用ASP建立Http组件
  • FileSystemobject组件
  • Dns组件的一些用法
  • chart组件在ASP中的应用
  • Zaks Pop3 参考说明
  • Zaks Pop3 简要介绍
  • ASP Image 使用范例
  • Asp Image 简要介绍
  • ASP HTTP 使用范例
  • Asp HTTP 简要介绍
  • ASP Ping 简要介绍
 
 

百度搜索

 
 

在ASP中使用Ad Rotator广告组件

  • 阅览次数:
  • 文章来源: 网海之贝
  • 原文作者: 佚名
  • 整理日期: 2006-10-03
  • 发表评论
  • 字体大小:
  • 小
  • 中
  • 大

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 (/Article/UploadFiles/200408/20040827163158771.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.

上一篇:MySQL数据库的导入导出 和 Liunx的权限
下一篇:构建支持Master/Slave读写分离的数据库操作类
  • 网友评论:
  • 查看所有评论
  • 我要发表评论
您的网名:
留言主题:
你要发表的内容:

 

关于本站 | 广告联系 | 版权声明 | 网站地图 | 发布软件 | 帮助中心 | 源码论坛

Copyright © 2005-2007 CodePub.Com  程序支持:木翼  滇ICP备05005971号