ASP.NET AdvertisementFile Property

Definition and Usage

AdvertisementFile property is used to set or return the path of the XML file containing advertising information.

Syntax

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

String value, specifying the location of the XML file containing advertising data.

Possible values:

  • Absolute path: (for example, http://www.codew3c.com/ads/bigad.xml)
  • Virtual root path: (for example, ~/ads/bigad.xml)
  • Relative path: (for example, ../ads/bigad.xml).

Example

The following example declares an AdRotator (view this XML file in TIY):

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

Example

Set the AdvertismentFile Property in AdRotator Control