What is the AdRotator control and it's uses?

AdRotator is a special control in ASP.NET used to display flashing banner advertisments. The control can display advertisments randomly or sequentially as set by the developer.

Using the AdRotator control

To use the control, drag it from the toolbox. In the properties window you will there are three key properties:

.AdvertisementsFile .KeywordFilter .Target

The advertisement file is an XML file which contains information about the image to be displayed and the page to which the user should be redirected on click.

The following example assumes there are two images named one.gif and two.gif. Below is the XML to correspond with our

example:

<Advertisement>
<Ad>
<ImageUrl>
one.gif
</ImageUrl>
<NavigateUrl>
http://www.codepedia.com
</NavigateUrl>
<AlternateText>
The Web's fastest growing technical encyclopdia
</AlternateText>
<Impressions>
1
</Impressions>
<Keyword>
Visual Basic
</Keyword>
</Ad>
<Ad>
<ImageUrl>
two.gif
</ImageUrl>
<NavigateUrl>
http://www.programmersheaven.com
</NavigateUrl>
<AlternateText>
Where the pro's are 
</AlternateText>
<Impressions>
1
</Impressions>
<Keyword>
Programming
</Keyword>
</Ad>
</Advertisements>


The above tags are explained below:

<ImageUrl>: The image URL that presents the advertisement image.
<NavigateUrl>: The on click redirect URL.
<AlternateText>: Image description/name thats show when the mouse is over the image ( Optional use ).
<Keyword>: Optional parameter that specifies the keyword (category) like books, programming etc.
<Impressions>: A number input that indicates the weight of the advertisment. This can be use to control the order of rotation with respect to other advertisments in the file. Again, this is optional.

Written by Sandeep Mogulla, Webmaster at www.startvbdotnet.com

Index

 
Printer friendly version of the FAQ-ASPNET-Ad-Rotator-Control page


Sponsored links

Villanova University Six Sigma & IT Certificate Programs
100% Online programs in Six Sigma, IS Security, CISSP Prep, Business Analysis, Proj. Mgmt. and more!
ASP.NET 3.5 Hosting on Windows 2008!
ASP.NET 3.5/2.0 Hosting on Windows 2008 & 2003! AJAX, LINQ, & Silverlight Ready! 3 Mo. Free!!
SFTP components for .NET
Add complete SSH and SFTP support to your .NET framework application
PureCM Software Configuration Management
Version control and integrated issue tracking - powerful and easy to use. Get your FREE trial now!
Virtual File System SDK
Create your own file systems in Windows and .NET applications

Advertisement



Free Magazine

Free Magazines
eWeek The essential technology information source for builders of e-business.... subscribe now

Newsletter | Submit Content | About | Advertising | Awards | Contact Us | Link to us |
© 1996-2008 Community Networks Ltd All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Synchron Data - .NET development.