ASP.Net AdRotator control can be used to display graphics that are linked to other pages. The list of graphics to be displayed and the associated target links is maintained in a data source such as an XML file or database.
ASP.Net AdRotator Web server control provides a way to display advertisements (ads) on your ASP.NET Web pages. The control displays a .gif file or other graphic image that you provide. When users click the ad, they are redirected to a target URL that you have specified. The control automatically reads advertisement information, such as the graphic file name and the target URL, from a list of ads that you provide using a data source, which is usually an XML file or a database table.
asp:AdRotator control selects ads randomly, changing the displayed ad each time the page is refreshed. Ads can be weighted to control the priority level of banners, making it possible to have certain ads display more often than others.
// XML CODE THAT AS THE DETAILS ABOUT THE ADS
<Advertisements>
<Ad>
<ImageUrl>C:\AdvFolder\AdRotator_Template\Adsense.gif</ImageUrl>
<NavigateUrl>http://www.Adsense.net</NavigateUrl>
<AlternateText>ASP.NET Logo</AlternateText>
<Keyword>A</Keyword>
<Impressions>Technology</Impressions>
<Caption>This is the caption for Ad#1</Caption>
</Ad>
<Ad>
<ImageUrl>C:\AdvFolder\AdRotator_Template\MakeMoney.gif</ImageUrl>
<NavigateUrl>http://www.MakeMoney.net</NavigateUrl>
<AlternateText>www.Sulekha.net</AlternateText>
<Keyword>S</Keyword>
<Impressions>Web Site</Impressions>
<Caption>This is the caption for Ad#2</Caption>
</Ad>
<Ad>
<ImageUrl>C:\AdvFolder\AdRotator_Template\OnlineEarn.swf</ImageUrl>
<NavigateUrl>AdRotator.aspx?ad=Widgets
&target=http://msdn.microsoft.com/widgets/</NavigateUrl>
<AlternateText>www.OnlineEarn.net</AlternateText>
<Keyword>S</Keyword>
<Impressions>Flash Site</Impressions>
<Caption>This is the caption for Ad#3</Caption>
</Ad>
</Advertisements>
<asp:AdRotator id="controlName" runat="server"
AdvertisementFile="demo-ads.xml" Target="_self">
</asp:AdRotator>
AdRotator control presents ad images that, when clicked, navigate to a new Web location. Each time the page is loaded into the browser, an ad is randomly selected from a predefined list. The rotation shedule of the adds is defined in a XML file.
AdRotator control uses a separate XML advertisement file to store the advertisement information, such as the location of the image to display and the URL of the page to link to. The AdvertisementFile property of the AdRotator control specifies the path to this file.
ASP.Net AdRotator Web server control provides a way to display advertisements (ads) on your ASP.NET Web pages. The control displays a .gif file or other graphic image that you provide. When users click the ad, they are redirected to a target URL that you have specified. The control automatically reads advertisement information, such as the graphic file name and the target URL, from a list of ads that you provide using a data source, which is usually an XML file or a database table.
asp:AdRotator control selects ads randomly, changing the displayed ad each time the page is refreshed. Ads can be weighted to control the priority level of banners, making it possible to have certain ads display more often than others.
// XML CODE THAT AS THE DETAILS ABOUT THE ADS
<Advertisements>
<Ad>
<ImageUrl>C:\AdvFolder\AdRotator_Template\Adsense.gif</ImageUrl>
<NavigateUrl>http://www.Adsense.net</NavigateUrl>
<AlternateText>ASP.NET Logo</AlternateText>
<Keyword>A</Keyword>
<Impressions>Technology</Impressions>
<Caption>This is the caption for Ad#1</Caption>
</Ad>
<Ad>
<ImageUrl>C:\AdvFolder\AdRotator_Template\MakeMoney.gif</ImageUrl>
<NavigateUrl>http://www.MakeMoney.net</NavigateUrl>
<AlternateText>www.Sulekha.net</AlternateText>
<Keyword>S</Keyword>
<Impressions>Web Site</Impressions>
<Caption>This is the caption for Ad#2</Caption>
</Ad>
<Ad>
<ImageUrl>C:\AdvFolder\AdRotator_Template\OnlineEarn.swf</ImageUrl>
<NavigateUrl>AdRotator.aspx?ad=Widgets
&target=http://msdn.microsoft.com/widgets/</NavigateUrl>
<AlternateText>www.OnlineEarn.net</AlternateText>
<Keyword>S</Keyword>
<Impressions>Flash Site</Impressions>
<Caption>This is the caption for Ad#3</Caption>
</Ad>
</Advertisements>
<asp:AdRotator id="controlName" runat="server"
AdvertisementFile="demo-ads.xml" Target="_self">
</asp:AdRotator>
AdRotator control presents ad images that, when clicked, navigate to a new Web location. Each time the page is loaded into the browser, an ad is randomly selected from a predefined list. The rotation shedule of the adds is defined in a XML file.
AdRotator control uses a separate XML advertisement file to store the advertisement information, such as the location of the image to display and the URL of the page to link to. The AdvertisementFile property of the AdRotator control specifies the path to this file.