RSS

Adrotator use XML for Advertisement

18 Apr

Create User Control

<div   style=”padding-top:2px; padding-left:0px;” id=”rotator”>

<asp:AdRotator ID=”adRtrCtrl” Target=”parent” runat=”Server” Width=”300px” Height=”250px” AdvertisementFile=”~/Advertisement/Advertisements.xml” AlternateTextField=”Hello” BorderStyle=”Solid” BorderWidth=”1px” BorderColor=”White”/></div>

Xml file

<Advertisements>

<Ad>

<ImageUrl>AdsImg/car.jpg</ImageUrl>

<NavigateUrl>https://humrahimcs.wordpress.com</NavigateUrl&gt;

<Alt>Csharp code</Alt>

<Caption>Csharp Site</Caption>

<Impressions>2</Impressions>

</Ad>

<Ad>

<ImageUrl>AdsImg/Advance.jpg</ImageUrl>

<NavigateUrl>https://humrahimcs.wordpress.com</NavigateUrl&gt;

<Alt>VB.Net</Alt>

<Caption>Visual Basic</Caption>

<Impressions>2</Impressions>

</Ad>

<Ad>

<ImageUrl>AdsImg/flower.jpg</ImageUrl>

<NavigateUrl>http://www.goolge.com</NavigateUrl&gt;

<Alt>Csharp code</Alt>

<Caption>Csharp Site</Caption>

<Impressions>2</Impressions>

</Ad>

<Ad>

<ImageUrl>AdsImg/main-image.jpg</ImageUrl>

<NavigateUrl>http://www.cricinfo.com</NavigateUrl&gt;

<Alt>.Net Professional Job Site</Alt>

<Caption>VS.Net</Caption>

<Impressions>2</Impressions>

</Ad>

</Advertisements>

Add User control in aspx page

Add Reference of User Control

<%@ Register Src=”~/controls/AdvertisementHome.ascx” TagName=”Ads” TagPrefix=”uc” %>

Add Script Manager for Ajax auto update Panel

<asp:ScriptManager ID=”ScriptManager1″ runat=”server”>

</asp:ScriptManager>

Add Update Panel and User Control

<asp:Timer ID=”Timer1″ runat=”server”  Interval=”10000″ Enabled=”True”>

</asp:Timer>

<asp:UpdatePanel ID=”UpdatePanel1″ runat=”server” style=” border:solid 0px white; “>

<Triggers>

<asp:AsyncPostBackTrigger ControlID=”Timer1″ EventName=”Tick” />

</Triggers>

<ContentTemplate >

<asp:Label ID=”Label1″ runat=”server” Text=”” />

<uc:Ads runat=”server” ID=”ctr_ads”  />

</ContentTemplate>

</asp:UpdatePanel>

Advertisements
 
1 Comment

Posted by on April 18, 2011 in ASP Dot Net C#

 

One response to “Adrotator use XML for Advertisement

  1. Free Movie Downloads - Direct Links

    May 25, 2013 at 7:11 pm

    The movie review sites choice review looks at the leading movie review sites and reviews the best choices available.

    Movie reviews have become a very popular destination online, largely because the information is always available, on call, whenever people want it.

    Because of that popularity, some sites providing movie reviews have progressed to a new level of providing this information, where they not only provide a single stop for movie reviews, but they also consolidate the content of a number of reviews into a general consensus of all reviews. It’s an approach not dissimilar to the metasearch trend that has become so popular in information retrieval today, and is a big plus for the ease with which we can now access movie reviews.

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: