Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder Freon22's Avatar
    Join Date
    May 2005
    Location
    USA
    Posts
    287
    Thanks
    3
    Thanked 5 Times in 5 Posts

    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.

  • #2
    New Coder
    Join Date
    Sep 2005
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think this is ok
    but how can we place a flesh file in addrotator
    can u giv code for xml file for this

  • #3
    Regular Coder Freon22's Avatar
    Join Date
    May 2005
    Location
    USA
    Posts
    287
    Thanks
    3
    Thanked 5 Times in 5 Posts
    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.

  • #4
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts
    xml should all be lower case anyway.. in theory


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •