AdRotator control gets its name because it is most often used to display advertisements on web pages. It displays an image randomly selected from a list stored in either a separate XML file or a data-bound data source. In either case, the list contains image attributes, including the path to the image and a URL to link to when the image is clicked. The image changes every time the page is loaded.
In addition to the properties inherited from
AdRotator control has the properties listed in Table 5-17, and an event you can handle called
AdCreated. This occurs once per round trip to the server after creation of the control, but before the page is rendered.
Table 5-17. Properties of the AdRotator control
The path to an XML file that contains the list of advertisements and their attributes. We describe this file in detail shortly.
The element name from the
The name of the specific list of data the control will bind to if the control is not using an XML file for ads.
An object from which the control can retrieve data.
The element name from the advertisement file or data field from which the URL for the image is stored. Default is