473,324 Members | 2,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

question about AdRotator

Dan
Hi,

I created an AdRotator control with this code:
<asp:AdRotator id="AdRotator1"
Runat="Server" AdvertisementFile="adrotator.xml">
</asp:AdRotator>

The xml file contains:
<Advertisements>
<Ad>
<ImageUrl>images/pic1.png</ImageUrl>
<NavigateUrl>http://www.cocacola.us</NavigateUrl>
<AlternateText>Coca Cola</AlternateText>
<Keyword>coca</Keyword>
<Impressions>50</Impressions>
</Ad>
<Ad>
<ImageUrl>images/pic2png</ImageUrl>
<NavigateUrl>http://www.alfaromeo.us</NavigateUrl>
<AlternateText>Alfa Romeo</AlternateText>
<Keyword>alfa</Keyword>
<Impressions>50</Impressions>
</Ad>
</Advertisements>

When running, i see the first advertising, but the second advertising never
appears. Do i need some codebehind code to switch from advertisings or it
must happen automatically?

Thanks
Dan
May 22 '07 #1
5 3100
Howdy,

<Advertisements
xmlns="http://schemas.microsoft.com/AspNet/AdRotator-Advertisement-File-1.2">
<Ad>
<ImageUrl>~/Images/pic1.png</ImageUrl>
<NavigateUrl>http://www.cocacola.us</NavigateUrl>
<AlternateText>Coca Cola</AlternateText>
<Keyword>coca</Keyword>
<Impressions>50</Impressions>
</Ad>
<Ad>
<ImageUrl>~/Images/pic2.png</ImageUrl>
<NavigateUrl>http://www.alfaromeo.us</NavigateUrl>
<AlternateText>Alfa Romeo</AlternateText>
<Keyword>alfa</Keyword>
<Impressions>50</Impressions>
</Ad>
</Advertisements>

It should work, try to refresh the page few times and see if the image
changes.

hope this helps

--
Milosz
"Dan" wrote:
Hi,

I created an AdRotator control with this code:
<asp:AdRotator id="AdRotator1"
Runat="Server" AdvertisementFile="adrotator.xml">
</asp:AdRotator>

The xml file contains:
<Advertisements>
<Ad>
<ImageUrl>images/pic1.png</ImageUrl>
<NavigateUrl>http://www.cocacola.us</NavigateUrl>
<AlternateText>Coca Cola</AlternateText>
<Keyword>coca</Keyword>
<Impressions>50</Impressions>
</Ad>
<Ad>
<ImageUrl>images/pic2png</ImageUrl>
<NavigateUrl>http://www.alfaromeo.us</NavigateUrl>
<AlternateText>Alfa Romeo</AlternateText>
<Keyword>alfa</Keyword>
<Impressions>50</Impressions>
</Ad>
</Advertisements>

When running, i see the first advertising, but the second advertising never
appears. Do i need some codebehind code to switch from advertisings or it
must happen automatically?

Thanks
Dan
May 22 '07 #2
Dan
Hi Milosz,

thanks for replying .. but i think there is a little misunderstanding ...
When i refresh my page, the advertising also changes.That's not the problem.
I thought the advertising would change by itself automatically.
Is it wrong and must the page each time be refreshed for switching between
advertisings?
"Milosz Skalecki [MCAD]" <mi*****@DONTLIKESPAMwp.plschreef in bericht
news:29**********************************@microsof t.com...
Howdy,

<Advertisements
xmlns="http://schemas.microsoft.com/AspNet/AdRotator-Advertisement-File-1.2">
<Ad>
<ImageUrl>~/Images/pic1.png</ImageUrl>
<NavigateUrl>http://www.cocacola.us</NavigateUrl>
<AlternateText>Coca Cola</AlternateText>
<Keyword>coca</Keyword>
<Impressions>50</Impressions>
</Ad>
<Ad>
<ImageUrl>~/Images/pic2.png</ImageUrl>
<NavigateUrl>http://www.alfaromeo.us</NavigateUrl>
<AlternateText>Alfa Romeo</AlternateText>
<Keyword>alfa</Keyword>
<Impressions>50</Impressions>
</Ad>
</Advertisements>

It should work, try to refresh the page few times and see if the image
changes.

hope this helps

--
Milosz
"Dan" wrote:
>Hi,

I created an AdRotator control with this code:
<asp:AdRotator id="AdRotator1"
Runat="Server" AdvertisementFile="adrotator.xml">
</asp:AdRotator>

The xml file contains:
<Advertisements>
<Ad>
<ImageUrl>images/pic1.png</ImageUrl>
<NavigateUrl>http://www.cocacola.us</NavigateUrl>
<AlternateText>Coca Cola</AlternateText>
<Keyword>coca</Keyword>
<Impressions>50</Impressions>
</Ad>
<Ad>
<ImageUrl>images/pic2png</ImageUrl>
<NavigateUrl>http://www.alfaromeo.us</NavigateUrl>
<AlternateText>Alfa Romeo</AlternateText>
<Keyword>alfa</Keyword>
<Impressions>50</Impressions>
</Ad>
</Advertisements>

When running, i see the first advertising, but the second advertising
never
appears. Do i need some codebehind code to switch from advertisings or it
must happen automatically?

Thanks
Dan

May 22 '07 #3
Howdy,

It's just the way how it works (it requires a postback). You can find some
nice resolutions to this limitation (i.e. if you use MS AJAX put adrotator
inside an UpdatePanel). Anyway, it would involve javascript coding, for
instance:
http://www.brettb.com/js_banner_ad_rotator.asp

Hope this helps
--
Milosz
"Dan" wrote:
Hi Milosz,

thanks for replying .. but i think there is a little misunderstanding ...
When i refresh my page, the advertising also changes.That's not the problem.
I thought the advertising would change by itself automatically.
Is it wrong and must the page each time be refreshed for switching between
advertisings?
"Milosz Skalecki [MCAD]" <mi*****@DONTLIKESPAMwp.plschreef in bericht
news:29**********************************@microsof t.com...
Howdy,

<Advertisements
xmlns="http://schemas.microsoft.com/AspNet/AdRotator-Advertisement-File-1.2">
<Ad>
<ImageUrl>~/Images/pic1.png</ImageUrl>
<NavigateUrl>http://www.cocacola.us</NavigateUrl>
<AlternateText>Coca Cola</AlternateText>
<Keyword>coca</Keyword>
<Impressions>50</Impressions>
</Ad>
<Ad>
<ImageUrl>~/Images/pic2.png</ImageUrl>
<NavigateUrl>http://www.alfaromeo.us</NavigateUrl>
<AlternateText>Alfa Romeo</AlternateText>
<Keyword>alfa</Keyword>
<Impressions>50</Impressions>
</Ad>
</Advertisements>

It should work, try to refresh the page few times and see if the image
changes.

hope this helps

--
Milosz
"Dan" wrote:
Hi,

I created an AdRotator control with this code:
<asp:AdRotator id="AdRotator1"
Runat="Server" AdvertisementFile="adrotator.xml">
</asp:AdRotator>

The xml file contains:
<Advertisements>
<Ad>
<ImageUrl>images/pic1.png</ImageUrl>
<NavigateUrl>http://www.cocacola.us</NavigateUrl>
<AlternateText>Coca Cola</AlternateText>
<Keyword>coca</Keyword>
<Impressions>50</Impressions>
</Ad>
<Ad>
<ImageUrl>images/pic2png</ImageUrl>
<NavigateUrl>http://www.alfaromeo.us</NavigateUrl>
<AlternateText>Alfa Romeo</AlternateText>
<Keyword>alfa</Keyword>
<Impressions>50</Impressions>
</Ad>
</Advertisements>

When running, i see the first advertising, but the second advertising
never
appears. Do i need some codebehind code to switch from advertisings or it
must happen automatically?

Thanks
Dan


May 22 '07 #4
That's correct. The AdRotator is designed to pull one item at random from
the datasource. It doesn't pull them all and then iterate through them
client-side. There are third-party rotator controls that can do it.
r.a.d.Rotator from www.telerik.com is an excellent control that can work
this client-side.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"Dan" <dd*@sdf.sdfwrote in message
news:%2******************@TK2MSFTNGP06.phx.gbl...
Hi Milosz,

thanks for replying .. but i think there is a little misunderstanding ...
When i refresh my page, the advertising also changes.That's not the
problem.
I thought the advertising would change by itself automatically.
Is it wrong and must the page each time be refreshed for switching between
advertisings?
"Milosz Skalecki [MCAD]" <mi*****@DONTLIKESPAMwp.plschreef in bericht
news:29**********************************@microsof t.com...
>Howdy,

<Advertisements
xmlns="http://schemas.microsoft.com/AspNet/AdRotator-Advertisement-File-1.2">
<Ad>
<ImageUrl>~/Images/pic1.png</ImageUrl>
<NavigateUrl>http://www.cocacola.us</NavigateUrl>
<AlternateText>Coca Cola</AlternateText>
<Keyword>coca</Keyword>
<Impressions>50</Impressions>
</Ad>
<Ad>
<ImageUrl>~/Images/pic2.png</ImageUrl>
<NavigateUrl>http://www.alfaromeo.us</NavigateUrl>
<AlternateText>Alfa Romeo</AlternateText>
<Keyword>alfa</Keyword>
<Impressions>50</Impressions>
</Ad>
</Advertisements>

It should work, try to refresh the page few times and see if the image
changes.

hope this helps

--
Milosz
"Dan" wrote:
>>Hi,

I created an AdRotator control with this code:
<asp:AdRotator id="AdRotator1"
Runat="Server" AdvertisementFile="adrotator.xml">
</asp:AdRotator>

The xml file contains:
<Advertisements>
<Ad>
<ImageUrl>images/pic1.png</ImageUrl>
<NavigateUrl>http://www.cocacola.us</NavigateUrl>
<AlternateText>Coca Cola</AlternateText>
<Keyword>coca</Keyword>
<Impressions>50</Impressions>
</Ad>
<Ad>
<ImageUrl>images/pic2png</ImageUrl>
<NavigateUrl>http://www.alfaromeo.us</NavigateUrl>
<AlternateText>Alfa Romeo</AlternateText>
<Keyword>alfa</Keyword>
<Impressions>50</Impressions>
</Ad>
</Advertisements>

When running, i see the first advertising, but the second advertising
never
appears. Do i need some codebehind code to switch from advertisings or
it
must happen automatically?

Thanks
Dan


May 23 '07 #5
Dan
Thanks again

"Milosz Skalecki [MCAD]" <mi*****@DONTLIKESPAMwp.plschreef in bericht
news:F3**********************************@microsof t.com...
Howdy,

It's just the way how it works (it requires a postback). You can find some
nice resolutions to this limitation (i.e. if you use MS AJAX put adrotator
inside an UpdatePanel). Anyway, it would involve javascript coding, for
instance:
http://www.brettb.com/js_banner_ad_rotator.asp

Hope this helps
--
Milosz
"Dan" wrote:
>Hi Milosz,

thanks for replying .. but i think there is a little misunderstanding ...
When i refresh my page, the advertising also changes.That's not the
problem.
I thought the advertising would change by itself automatically.
Is it wrong and must the page each time be refreshed for switching
between
advertisings?
"Milosz Skalecki [MCAD]" <mi*****@DONTLIKESPAMwp.plschreef in bericht
news:29**********************************@microso ft.com...
Howdy,

<Advertisements
xmlns="http://schemas.microsoft.com/AspNet/AdRotator-Advertisement-File-1.2">
<Ad>
<ImageUrl>~/Images/pic1.png</ImageUrl>
<NavigateUrl>http://www.cocacola.us</NavigateUrl>
<AlternateText>Coca Cola</AlternateText>
<Keyword>coca</Keyword>
<Impressions>50</Impressions>
</Ad>
<Ad>
<ImageUrl>~/Images/pic2.png</ImageUrl>
<NavigateUrl>http://www.alfaromeo.us</NavigateUrl>
<AlternateText>Alfa Romeo</AlternateText>
<Keyword>alfa</Keyword>
<Impressions>50</Impressions>
</Ad>
</Advertisements>

It should work, try to refresh the page few times and see if the image
changes.

hope this helps

--
Milosz
"Dan" wrote:

Hi,

I created an AdRotator control with this code:
<asp:AdRotator id="AdRotator1"
Runat="Server" AdvertisementFile="adrotator.xml">
</asp:AdRotator>

The xml file contains:
<Advertisements>
<Ad>
<ImageUrl>images/pic1.png</ImageUrl>
<NavigateUrl>http://www.cocacola.us</NavigateUrl>
<AlternateText>Coca Cola</AlternateText>
<Keyword>coca</Keyword>
<Impressions>50</Impressions>
</Ad>
<Ad>
<ImageUrl>images/pic2png</ImageUrl>
<NavigateUrl>http://www.alfaromeo.us</NavigateUrl>
<AlternateText>Alfa Romeo</AlternateText>
<Keyword>alfa</Keyword>
<Impressions>50</Impressions>
</Ad>
</Advertisements>

When running, i see the first advertising, but the second advertising
never
appears. Do i need some codebehind code to switch from advertisings or
it
must happen automatically?

Thanks
Dan



May 23 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: kdmath | last post by:
I want to use the AdRotator control to dispay pay per click ads in the banner. I am able to use the AdRotator control for other links but when I use the code that the pay per click ads say to...
5
by: Erica | last post by:
My images in Adrotator are not displaying. The ALT tag only displays. My text file looks like this: redirect redirect.asp border 0 height 115 width 215 * /images/awards.swf...
0
by: Erica | last post by:
Hopefully someone can offer me a workaround to this problem: I am using adRotator to rotate some reminders on my intranet site. I have a redirect page name redirect.asp that recieves the...
0
by: Kiran R | last post by:
Hi, Is there any way to show different advertisements(images) in a certain interval of time using AdRotator. I am able to display different images when the page get refreshed using AdRotator....
2
by: Leon | last post by:
How to display flash banners using the built-in .net AdRotator control? Do I have to extend the existing AdRotator control? if so than how? If you know of any books or website that explain the...
1
by: clintonG | last post by:
After months of stable operation the AdRotator has become unstable. Maybe its the Themes or the MasterPage who knows? The AdRotator is showing the images from Theme 1 when Theme 2 is selected...
7
by: Aussie Rules | last post by:
Hi, I have a adrotator control on a page, and want to program the connection of the control via SQL. I have the following code which doesn't seem to do much, and not sure what else to do? ...
1
by: Aussie Rules | last post by:
Hi, I have a few adrotators on a page, each bound to a sql dataset from my database The function works fine, but as we are going to charge for the advertising impression and click throughs I...
0
by: MC | last post by:
I have coded an AdRotator to use a Database for it's data source. If I use a SqlDataSource control it functions as expected, however if I manually retreive the data using an OleDBDataReader It...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.