Latest web development tutorials

ASP.NET AdRotator AdvertisementFile 屬性

AdRotator 控件 AdRotator控件

定義和用法

AdvertisementFile 屬性用於設置或返回包含廣告數據的XML 文件的路徑。

語法

<asp:AdRotator AdvertisementFile="path" runat="server" />

属性 描述
path 字符串值,规定包含广告数据的 XML 文件的位置。

可能的值:

  • 绝对路径(比如 http://www.w3cschool.cc/ads/bigad.xml)
  • 虚拟根路径(比如 ~/ads/bigad.xml)
  • 相对路径(比如 /ads/bigad.xml)


實例

實例

聲明一個AdRotator(在"嘗試一下"實例中查看XML 文件):

<form runat="server">
<asp:AdRotator id="ad1" runat="server"
AdvertisementFile="Ad1.xml" />
</form>

演示實例»


AdRotator 控件 AdRotator控件