AdRotator Control
This control is called an AdRotator because it is most often used to display advertisements
on web pages. It displays an image randomly selected from a list stored either in 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 WebControl, the AdRotator control has the properties and events listed in Table 5-10.
Table 5-10. Properties and events of the AdRotator control
|
Name |
Type |
Get |
Set |
Description |
|---|---|---|---|---|
|
AdvertisementFile |
String |
✗ |
✗ |
The path to an XML file that contains the list of advertisements and their attributes. This file is described in detail below. |
|
AlternateTextField |
String |
✗ |
✗ |
Element name from the |
|
DataMember |
String |
✗ |
✗ |
The name of the specific list of data the control will bind to. |
|
DataSource |
Object |
✗ |
✗ |
An object from which the control can retrieve data. |
|
DataSourceID |
String |
✗ |
✗ |
The |
|
ImageUrlField |
String |
✗ |
✗ |
Element name from the |
|
KeywordFilter |
String |
✗ |
✗ |
Filters ads displayed to include only those with the specified ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access