asp.net.ph

Skip Navigation Links

Adding AdRotator Controls to a Web Forms Page

Controls You Can Use on Web Forms   ASP.NET Standard Controls   AdRotator Control


First you add the AdRotator control to a page, and then link it to the ads you wish to display. Link ads to the control either by using a separate XML file containing the ad information or by linking the ads to the control within an event handler at run time.

To add an AdRotator control to a Web Forms page

  1. Declare an <asp:AdRotator> element on the page. For syntax, see AdRotator Control Syntax.
  2. Set the AdvertisementFile property to the location of the XML ad schedule file.
    • If the AdvertisementFile property is set to an XML file, then the AdCreated event occurs after the ad has been selected.
    • Alternatively, you can set the ad properties in the AdCreated event.
AdCreatedEventHandler.aspx
Run Sample | View Source
See Also

Creating an Ad List for the Ad Rotator Web Server Control



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note