Tuesday, 16 July 2013

How to use AdRotator in ASP.NET using C# with Timer Rotate Ads without Refreshing the page.

I previously explained about AdRotator.
Here, I just example of How to use AdRotator in ASP.NET using C# with Timer Rotate Ads without Refreshing the page.

Create a new website in visual studio and add a new folder named Banner and place some images in it.

Add AdRotator server side control within UpdatePannel and add ScriptManager and Timer control in created this new website.

Default.aspx (design page):
 
 AdRotator control display advertisements from XML file.
For this right click in solution explorer > Add New Item > XML File.

Name it AdvertsmntFile.xml and write following info in it.
 AdvertsmntFile.xml:

Default.aspx.cs (source page):


Build and run the code (Default.aspx):
Output: