Controls You Can Use on Web Forms ASP.NET Standard Controls AdRotator Control
You can create an ad list that serves as a schedule for the AdRotator control via an XML file . The following attributes can be included in the ad rotator schedule.
Element |
Description |
<ImageUrl > |
The absolute or relative URL of the image file to display ( required ) . |
<NavigateUrl > |
The URL of the page to navigate to when the AdRotator is clicked ( required ) .
NOTE: If this element is not set, no HRef property is generated on the anchor tag at run time; in effect, no hyperlink is specified for the ad. |
<AlternateText > |
The text to display in place of the image when the image specified in ImageUrl is not accessible ( optional ) .
In some browsers, this text also appears as a ToolTip for the advertisement. |
<Keyword > |
A category for the advertisement ( for example, "computers" ) that can be used to filter for specific ads ( optional ) . |
<Impressions > |
A number that indicates the importance of the ad in the schedule of rotation relative to the other ads in the file ( optional ) . This value specifies the likelihood of how often the ad is displayed.
The larger the number, the more often the ad is displayed. The total of all <Impressions > values in the XML file may not exceed 2,048,000,000 - 1. |
Note that the XML file requires both an ImageURL and NavigateURL property; the rest of the ad schedule properties, though, are optional.
The below example shows the format for the XML advertisement file.
Show me
Selecting Ads in an AdRotator Control at Run Time