About the author

Imran Imran
Like Development in DotNet.

E-mail me Send mail

Recent Articles

 
1: Roles And Membership
Category: ASP.Net
Added: 6/2/2008

 
2: ListView and DataPager in ASP.NET 3.5
Category: ASP.Net
Added: 5/15/2008

 
3: Asp.Net Cookies
Category: ASP.Net
Added: 5/8/2008

 
4: DatagridDatalistRepeater
Category: ASP.Net
Added: 5/8/2008

 
5: mySql With Asp.Net
Category: Databases
Added: 4/16/2008

 
6: MDF without LDF
Category: Databases
Added: 4/16/2008

 
7: Disable Right Click
Category: Java Script
Added: 4/16/2008

 
8: String Functions
Category: ASP.Net
Added: 3/20/2008

 
9: Water Mark
Category: HTML & DHTML
Added: 3/20/2008

 
10: Ajax With Javascript
Category: AJAX
Added: 3/10/2008

ASP.NET AdRotator

by Imran 26/February/2008

The AdRotator control is used to display a sequence of ad images.

This control uses an XML file to store the ad information. The XML file must begin and end with an <Advertisements> tag. Inside the <Advertisements> tag there may be several <Ad> tags which defines each ad.

File:RandomAd.xml

<Advertisements>

<Ad>

<ImageUrl>images/banner1.gif</ImageUrl>

<NavigateUrl>http://www.asp.net</NavigateUrl>

<AlternateText>Development for the Asp</AlternateText>

<Keyword>Developers</Keyword>

<Impressions>5</Impressions>

</Ad>

<Ad>

<ImageUrl>images/banner2.gif</ImageUrl>

<NavigateUrl>http://www.codeproject.com</NavigateUrl>

<AlternateText>Up Your ASP</AlternateText>

<Keyword>ASP.NET</Keyword>

<Impressions>5</Impressions>

</Ad>

</Advertisements>

File: AdRotatorPlus.aspx

<%@ Page Language="VB" %>
<html>
<body>
<H1>AdRotator in ASP.NET</H1>

<asp:AdRotator id=myAdRotator runat=server
    AdvertisementFile="RandomAd.xml"
    BorderWidth=2
    />

</body>
</html>



Powered by DotNetClassic.com