Ad Rotator

Learn how to rotate your banner ads on your website with the Ad Rotator.

The following code should be inserted on each aspx page you would like the ad to appear on:
<asp:AdRotator AdvertisementFile="banners.xml" runat="server" target="_blank" />

Creating the Advertisement File

The advertisement file used by the AdRotator is a simple XML file that should use the following format:

<?xml version="1.0" encoding="utf-8" ?>
<Caption>Web Design and Development Company</Caption>

The advertisement file consists of the following elements:

<Advertisements> This tag should surround all ads within your file. This is called the root element.

<Ad>                    This tag contains all the attributes for a single ad within your ad list.

<ImageUrl>           The path of the image file that will be displayed.

<NavigateUrl>        The URL that the image file will link to.

<AlternateText>     The ALT text for the image. This will be displayed when a user hovers over the                                image or if the image can not be found.

<Keyword>            This is what the KeywordFilter property of the <asp:AdRotator> tag searches                                    for when filtering ads to display on a page.

<Impressions>       This property specifies the relative number of times this ad compared to the                                    other ads.

Code for Aspx Page

<%@ Page Language="VB" %>

<form runat="server">
<asp:AdRotator id="AdRotator1" runat="server" AdvertisementFile="banners.xml" Height="150px" Width="150px" target=”_blank”></asp:AdRotator>

View Demo