ASP.NET AdRotator AdvertisementFileProperty


AdRotator 控件AdRotator Control

Definition and Usage

The AdvertisementFile property is used to set or return the path to an XML file that contains advertisement data.

Syntax

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

Property Description
path String value that specifies the location of the XML file containing advertisement data.

Possible values:

  • Absolute path (for example http://www.w3cschool.cc/ads/bigad.xml)
  • Virtual root path (for example ~/ads/bigad.xml)
  • Relative path (for example /ads/bigad.xml)


Example

Example

Declare an AdRotator (see the XML file in the "Try it Yourself" example):

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

Try it Yourself »


AdRotator 控件AdRotator Control Other Extensions