ankitweblogic logo
W e b t u t o r i a l s

ASP.NET Tutorial


ASP.NET Introduction

ASP.NET Web Forms

Standard Controls

Label Control

TextBox Control

Image Control

Button Controls

Redirecting User

Using HyperLinks

RadioButton Control


CheckBox Control

CheckBoxList Control


ListBox Control

ImageMap Control

Master Page

View State

Event-Driven Programming


ASP.NET Page Structure

Visibility of Controls

Formatting Controls

Applying CSS

Dynamic CSS

Using Style Class

Themes and Skins

Panel Control

PlaceHolder Control

AdRotator Control

Calendar Control

Validation Controls

Page Navigation

User Control

Separating Code-Presentation

Overview of ADO.NET

Data Binding

DataBinding List Control

AdRotator Control

The AdRotator control is an ASP.NET rich control that is used to create and manipulate banner advertisements in Web pages. It can automatically rotate through a series of advertisements, displaying each with the specified frequency. The properties of the banner advertisements to be displayed by the control are specified in an XML file.

The properties, methods, and events of the AdRotator control are shown in Table

Property Description
AdvertisementFile The path to the XML file that contains the banner advertisements to be displayed.
KeywordFilter Only the advertisements matching the set filter are returned.
Target When the user clicks the advertisement, the page is opened in this window or frame.possible values are _top, _new, _child, _self, _parent, _blank.
Methods Description
OnAdCreated Raises the AdCreated event.
Events Description
AdCreated Raised after an advertisement is retrieved from the file and before it is rendered.

The properties of an advertisement are described below. All except the ImageUrl are optional.
• ImageUrl: It indicates the URL of the image to be displayed in the advertisement. It can be either a relative or an absolute path.
• NavigateUrl: It indicates the URL of the target Web site to which users will be taken when they click on the advertisement.
• AlternateText: It is displayed in browsers that do not support images. It is also used to display ToolTip text.
• Keyword: It indicates the advertisement category.
• Impressions: It indicates the weightage given to the advertisement with respect to the other advertisements in the file. An advertisement with a higher value will be shown more number of times.