Implementing Adrotator control | ASPMANTRA | Asp.Net,MVC,AngularJs,Jquery,Javascript,Sql Server AND WCF snippets and tutorial

Implementing Adrotator control

In this article I am going to explain how to implement AdRotator control of

Adrotator control is used to show custom Ads (advertisements) on build websites. When users click on any ad they will be redirect to link assign for that. We can use both Xml and database as data source. Xml and database table must have following properties and columns: ImageUrl, NavigateUrl, AlternateText, Impressions, Keyword, Width and Height.

I am using Xml to implement this example. I have add Xml File.

Source of XML file (Adfile.xml)

<?xml version="1.0" encoding="utf-8" ?>
    <AlternateText>Pizza hut</AlternateText>
    <Keyword>Pizza hut</Keyword>

Add Adrotator control to webform. We have to pass xml file path to AdvertisementFile property of control.

Complete source of webform
<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
        <asp:AdRotator ID="AdRotator1" runat="server" AdvertisementFile="~/AdFile.xml" Target="_blank"/>

Post a Comment



Contact Form


Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget