Recent Articles

 
1: Read And Write XML with Dataset
Category: VB.NET
Added: 2/11/2009

 
2: Split Ajax Tab Control into Rows
Category: AJAX
Added: 2/2/2009

 
3: Path Less Css in Master Page in Asp.Net
Category: ASP.Net
Added: 1/27/2009

 
4: Prevent user going back to restricted area
Category: ASP.Net
Added: 1/25/2009

 
5: Sql Server MSC Error
Category: Databases
Added: 1/10/2009

 
6: Web Browser Control Javascript Close Button Error
Category: VB.NET
Added: 1/3/2009

 
7: ChartFX Volume in Candlestick without Extensions
Category: VB.NET
Added: 1/3/2009

 
8: Hard disk serial number Library
Category: VB.NET
Added: 1/3/2009

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

 
10: ListView and DataPager in ASP.NET 3.5
Category: ASP.Net
Added: 5/15/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