How to: Add and Configure an AdRotator Control 

Use the AdRotator control to display an advertisement from a collection of advertisement banners on a page each time the page loads. You must link it to the advertisements that you want to display by specifying the name of an XML file that contains the locations of advertisement banners. The file can also contain the banners' associated navigational links.

To add an AdRotator control to an ASP.NET mobile Web Forms page

  1. Drag an AdRotator control from the Mobile Web Forms tab of the Toolbox onto a Form or Panel control, or inside a control's template on a mobile Web Forms page. You can also drag it onto a mobile user control page.

  2. If you want to change the default name of the AdRotator control, type the new name in the ID property field in the Properties window.

  3. Link the AdRotator control to a set of advertisements by entering the URL of the XML file that contains the advertisements in the AdvertisementFile property:

    1. In the Properties window, click the ellipsis button (ASP.NET Mobile Designer ellipse) next to the AdvertisementFile property. The Select XML File dialog box is displayed.

    2. Enter the URL of the XML advertisement file. If the advertisement file is in the currently selected project, you can click it in the Contents list.

    3. When finished, click OK.

  4. Set the other properties as needed.

See Also

Reference

AdRotator

Concepts

Introduction to the AdRotator Control
Introduction to the Form Control
Overriding Properties

Other Resources

Using Device Filters