AdRotator Control in ASP.Net

In previous asp.net server control post we had discussed about MultiView Control and ListBox Control and FileUpload Control and CheckBox Control and RadioButton Control and DropDownList Control and TextBox Control.

ASP.Net AdRotator Control

The AdRotator is one of the rich web server control of asp.net. AdRotator control is used to display a sequence of advertisement images as per given priority of image.

Adrotator control display the sequence of images, which is specified in the external XML file. In a xml file we indicate the images to display with some other attributes, like  image impressions, NavigateUrl, ImageUrl, AlternateText.

In a Adrotator control images will be changed each time while refreshing the web page.

AdRotator Control Example in ASP.Net

Step 1 – Open the Visual Studio –> Create a new empty Web application.

Step 2 – Create a  New web page for display AdRotator control.

step 3 - Drag and drop AdRotator Control on web page from toolbox.

step 4 – go to Add New Item –> Add New XML File in project for write advertisement detail.

step 5 – Assign XML File to AdvertisementFile Property of AdRotator control.

Now, let’s understand the adrotator control with an asp.net example.

Adrotator Control in ASP.Net C#

Create a asp.net web application and take an adrotator control on web forms like below:

How to use Adrotator control in asp.net C#.

How to use Adrotator control in asp.net C#.

Now, Add new XML file by going to add new item menu.

How to use Adrotator control in asp.net C#.

How to use Adrotator control in asp.net C#.

Select XML file, assign any name for xml file and click Add button to add new xml file.

How to use Adrotator control in asp.net C#.

How to use Adrotator control in asp.net C#.

write below code for advertisement in xml file

The XML file contain the advertisement information.

ImageUrl describe the path of image which is display in adrotator.

Impressions describe the display rate of images or priority of image.

Advertisement XML File for Adrotator Control

Now, assign the XML file to adrotator control by AdvertisementFile property of adrotator control.

How to use Adrotator control in asp.net C#.

How to use Adrotator control in asp.net C#.

 

How to use Adrotator control in asp.net C#.

How to use Adrotator control in asp.net C#.

 

How to use Adrotator control in asp.net C#.

How to use Adrotator control in asp.net C#.

 

How to use Adrotator control in asp.net C#.

How to use Adrotator control in asp.net C#.

One Response to AdRotator Control in ASP.Net

  1. saleem shaik says:

    easy to understand every topic thank u to meeraacademy.com

Leave a Reply

Your email address will not be published. Required fields are marked *

7 + 3 =


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">