Click to See Complete Forum and Search --> : Using AdRotator control.


nobitavn94
10-09-2006, 11:37 AM
Hi all !
I'm using ASP.NET 2003.I have a question about AdRotator control.I wonder if there is any way that I can use many AdRotator control with one file Advertisement.xml (I want to place many ads and store info about them in the file Advertisement.xml ).
Thanks you very much .

Cstick
10-09-2006, 11:08 PM
Yes, you can use 1 xml file for many different AdRotators. Within the <Ad> tag of the advertisement.xml file is a tag <Keyword>. You can use the <Keyword> tag to group images together. For example, you could use a keyword "cars" for images of cars and "houses" for images of houses.

Then within the html for your AdRotators, you use the KeywordFilter attribute to specify which group of images you'd like to use for that AdRotator. Like this:


<asp:adrotator id="CarsAdRotator" runat="server" KeywordFilter="cars" AdvertisementFile="Advertisement.xml" />

<asp:adrotator id="HousesAdRotator" runat="server" KeywordFilter="houses" AdvertisementFile="Advertisement.xml" />


I think that is what you were looking for.