HighTechTalks DotNet Forums  

question about AdRotator

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss question about AdRotator in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Dan
 
Posts: n/a

Default question about AdRotator - 05-22-2007 , 04:50 AM






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



Reply With Quote
  #2  
Old   
Milosz Skalecki [MCAD]
 
Posts: n/a

Default RE: question about AdRotator - 05-22-2007 , 09:47 AM






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:

Quote:
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




Reply With Quote
  #3  
Old   
Dan
 
Posts: n/a

Default Re: question about AdRotator - 05-22-2007 , 10:01 AM



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]" <mily242 (AT) DONTLIKESPAMwp (DOT) pl> schreef in bericht
news:299B0A97-D477-4252-B563-5AF80B781FA7 (AT) microsoft (DOT) com...
Quote:
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






Reply With Quote
  #4  
Old   
Milosz Skalecki [MCAD]
 
Posts: n/a

Default Re: question about AdRotator - 05-22-2007 , 12:07 PM



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:

Quote:
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]" <mily242 (AT) DONTLIKESPAMwp (DOT) pl> schreef in bericht
news:299B0A97-D477-4252-B563-5AF80B781FA7 (AT) microsoft (DOT) 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







Reply With Quote
  #5  
Old   
Dan
 
Posts: n/a

Default Re: question about AdRotator - 05-22-2007 , 12:12 PM



Thanks again

"Milosz Skalecki [MCAD]" <mily242 (AT) DONTLIKESPAMwp (DOT) pl> schreef in bericht
news:F315915C-870A-48B9-91D7-2CF8EA3E3A7D (AT) microsoft (DOT) com...
Quote:
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]" <mily242 (AT) DONTLIKESPAMwp (DOT) pl> schreef in bericht
news:299B0A97-D477-4252-B563-5AF80B781FA7 (AT) microsoft (DOT) 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









Reply With Quote
  #6  
Old   
Mark Fitzpatrick
 
Posts: n/a

Default Re: question about AdRotator - 05-22-2007 , 08:44 PM



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" <ddf (AT) sdf (DOT) sdf> wrote

Quote:
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]" <mily242 (AT) DONTLIKESPAMwp (DOT) pl> schreef in bericht
news:299B0A97-D477-4252-B563-5AF80B781FA7 (AT) microsoft (DOT) 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








Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.