Go Back   CodingForums.com > :: Server side development > ASP.NET

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-06-2006, 04:28 PM   PM User | #1
Freon22
Regular Coder

 
Freon22's Avatar
 
Join Date: May 2005
Location: USA
Posts: 287
Thanks: 3
Thanked 5 Times in 5 Posts
Freon22 will become famous soon enough
display rotating ads

I am moving into asp.net, having fun so far. When I was coding in vbscript I never messed with the rotating ads. But now I see where I can use it on one or two pages.

Anyway I wanted to run some test before I tryed to code it into my pages. The problem I am having is when I run this test page it will only rotate between the first three ads. I have even tryed to use the Keyword Filter to see if I can force it to display an ad below the first three but it won't.

Here is the code for the display page.
Code:
<body>
    <center>

       <form id="Form2" action="intro5.aspx" method="post" runat="server">

       <asp:adrotator ID="Adrotator1" AdvertisementFile="ads.xml" BorderColor="black" BorderWidth=1 KeywordFilter="Races" runat="server" />



           <h3> Name: <asp:textbox id="Name" runat="server"/>

           Category:  <asp:dropdownlist id="Category" runat=server>
                         <asp:listitem >psychology</asp:listitem>
                         <asp:listitem >business</asp:listitem>
                         <asp:listitem >popular_comp</asp:listitem>
                      </asp:dropdownlist>
           </h3>

           <asp:button ID="Button1" text="Lookup" runat="server"/>

       </form>

       </center>

</body>
Here is the xml page
Code:
<Advertisements>

  <Ad>
    <ImageUrl>images/human.gif</ImageUrl>
    <NavigateUrl>http://freon22.net</NavigateUrl>
    <AlternateText>Human</AlternateText>
    <Keyword>Races</Keyword>
    <Impressions>50</Impressions>
  </Ad>

  <Ad>
    <ImageUrl>images/alskant.gif</ImageUrl>
    <NavigateUrl>http://freon22.net</NavigateUrl>
    <AlternateText>Alskant</AlternateText>
    <Keyword>Races</Keyword>
    <Impressions>50</Impressions>
  </Ad>

  <Ad>
    <ImageUrl>images/ikthorne.gif</ImageUrl>
    <NavigateUrl>http://freon22.net</NavigateUrl>
    <AlternateText>Ik'Thorne</AlternateText>
    <Keyword>Races</Keyword>
    <Impressions>50</Impressions>
  </Ad>

  <AD>
    <ImageUrl>images/salvene.gif</ImageUrl>
    <NavigateUrl>http://freon22.net</NavigateUrl>
    <AlternateText>Salvene</AlternateText>
    <Keyword>Races</Keyword>
    <Impressions>50</Impressions>
  </AD>

  <AD>
    <ImageUrl>images/creonti.gif</ImageUrl>
    <NavigateUrl>http://freon22.net</NavigateUrl>
    <AlternateText>Creonti</AlternateText>
    <Keyword>Races</Keyword>
    <Impressions>50</Impressions>
  </AD>

  <AD>
    <ImageUrl>images/thevian.gif</ImageUrl>
    <NavigateUrl>http://freon22.net</NavigateUrl>
    <AlternateText>Thevian</AlternateText>
    <Keyword>Races</Keyword>
    <Impressions>50</Impressions>
  </AD>

  <AD>
    <ImageUrl>images/wqhuman.gif</ImageUrl>
    <NavigateUrl>http://freon22.net</NavigateUrl>
    <AlternateText>WQ Human</AlternateText>
    <Keyword>Races</Keyword>
    <Impressions>50</Impressions>
  </AD>

</Advertisements>
Any idea what I am doing wrong?

Thanks for taking the time to look at this post.
Freon22 is offline   Reply With Quote
Old 02-07-2006, 06:44 AM   PM User | #2
hytechpro
New Coder

 
Join Date: Sep 2005
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
hytechpro is an unknown quantity at this point
I think this is ok
but how can we place a flesh file in addrotator
can u giv code for xml file for this
hytechpro is offline   Reply With Quote
Old 02-07-2006, 01:22 PM   PM User | #3
Freon22
Regular Coder

 
Freon22's Avatar
 
Join Date: May 2005
Location: USA
Posts: 287
Thanks: 3
Thanked 5 Times in 5 Posts
Freon22 will become famous soon enough
Thanks guys for looking at this but I found the trouble. I went over this code letter by letter looking for an error. I could not fine any. Guess what? Its case sensitive. I had <Ad></Ad> and <AD></AD>. The first three were <Ad> and after that they are <AD>. lol

I just didn't see it :-) well they say live and learn. Moving to ASP.NET its my turn to do some learning.
Freon22 is offline   Reply With Quote
Old 02-13-2006, 06:08 PM   PM User | #4
ghell
Senior Coder

 
Join Date: Apr 2003
Location: England
Posts: 1,192
Thanks: 5
Thanked 13 Times in 13 Posts
ghell is on a distinguished road
xml should all be lower case anyway.. in theory
__________________
My tech/code blog
ghell is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

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

Forum Jump


All times are GMT +1. The time now is 02:33 AM.


Advertisement
Log in to turn off these ads.