In this section we talk about the advertising control AdRotator,
which requires an XML file to store advertising information. Description of the node parameters of this XML file:
ImageUrl image address.
NavigateUrl connection address, where the ad navigation goes
AlternateText The prompt text displayed when the mouse is placed on the image
Keyword The keyword for this ad
Impressions weight, that is, the frequency weight of the display, we can actually add some things to it. Haha, for example, in this example, we added a date control node.
The AdRotator control automatically performs loop processing, changing the display every time the page is refreshed. content. Ads can be weighted to control the priority of banners so that some ads appear more often than others.
Your app can also use custom logic to cycle through ads. To generate ads on a mobile Web Forms page, you must provide an image file for the ad. You can associate an ad image with a destination URL that users will navigate to when they click the ad link.
For the problem of ad display counting, we can solve it in the AdCreated event, but it is a bit troublesome to calculate the click count. We need to create a new page and let this page complete your modification of database records and redirection. .In
the AdCreated event, we can also control whether the advertising items are displayed based on the set time.
For advertising controls, remember that the format of the XML file and the case of the nodes cannot be ignored! !