Rotator stops at 2nd last frame always

2 posts, 0 answers
  1. sayak
    sayak avatar
    23 posts
    Member since:
    Jun 2007

    Posted 06 Jan 2009 Link to this post

    I have a xml data source linked to an xml file with contents for 8 images. The rotator always stops at the 2nd last image.
    My setting are:

    Type: AutoAdvance
    Direction: Left
    FrameDuration= 8000
    and ScrollDuration=500

                                <ItemTemplate>
                                    <asp:Image ID="Image1" runat="server" ImageUrl='<%# XPath("ImageUrl") %>'  ToolTip='<%# XPath("AlternateText") %>'/>
                                </ItemTemplate>

    XML File:
    <?xml version="1.0" encoding="utf-8" ?>
    <Ads>
    <ad>
        <ImageUrl>~/Images/ad1.gif</ImageUrl>
        <AlternateText>1st Ad</AlternateText>
        <Keyword>1st Ad</Keyword>    
      </ad>
      <ad>
        <ImageUrl>~/Images/ad2.gif</ImageUrl>
        <AlternateText>2nd Ad</AlternateText>
        <Keyword>2nd Ad</Keyword>
        <Impressions>50</Impressions>
      </ad>
    ....
    ....
    ...
    </Ads>

    Please help!

    Thanks,
    Sayak

  2. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 07 Jan 2009 Link to this post

    Hi Sayak,

    I was not able to reproduce the problem by using your setup. Here is the test setup that I used:

    Content of XML file :

    <?xml version="1.0" encoding="utf-8" ?> 
    <Ads> 
       <ad> 
          <ImageUrl>~/Images/image1.jpg</ImageUrl> 
          <AlternateText>1st Ad</AlternateText> 
          <Keyword>1st Ad</Keyword> 
       </ad> 
       <ad> 
          <ImageUrl>~/Images/image2.jpg</ImageUrl> 
          <AlternateText>2nd Ad</AlternateText> 
          <Keyword>2nd Ad</Keyword> 
          <Impressions>50</Impressions> 
       </ad> 
       <ad> 
          <ImageUrl>~/Images/image3.jpg</ImageUrl> 
          <AlternateText>1st Ad</AlternateText> 
          <Keyword>1st Ad</Keyword> 
       </ad> 
       <ad> 
          <ImageUrl>~/Images/image4.jpg</ImageUrl> 
          <AlternateText>2nd Ad</AlternateText> 
          <Keyword>2nd Ad</Keyword> 
          <Impressions>50</Impressions> 
       </ad> 
       <ad> 
          <ImageUrl>~/Images/image5.jpg</ImageUrl> 
          <AlternateText>1st Ad</AlternateText> 
          <Keyword>1st Ad</Keyword> 
       </ad> 
       <ad> 
          <ImageUrl>~/Images/image6.jpg</ImageUrl> 
          <AlternateText>2nd Ad</AlternateText> 
          <Keyword>2nd Ad</Keyword> 
          <Impressions>50</Impressions> 
       </ad> 
       <ad> 
          <ImageUrl>~/Images/image7.jpg</ImageUrl> 
          <AlternateText>1st Ad</AlternateText> 
          <Keyword>1st Ad</Keyword> 
       </ad> 
       <ad> 
          <ImageUrl>~/Images/image8.jpg</ImageUrl> 
          <AlternateText>2nd Ad</AlternateText> 
          <Keyword>2nd Ad</Keyword> 
          <Impressions>50</Impressions> 
       </ad> 
    </Ads> 


    My Default.aspx page  :

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"
    <head runat="server"
       <title>Untitled Page</title> 
    </head> 
    <body> 
       <form id="form1" runat="server"
          <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
          </telerik:RadScriptManager> 
          <telerik:RadRotator ID="RadRotator1" Width="80px" Height="50px" DataSourceID="XmlDataSource1" 
             RotatorType="AutomaticAdvance" ScrollDirection="Left" FrameDuration="8000" ScrollDuration="500" 
             runat="server"
             <ItemTemplate> 
                <asp:Image ID="Image1" runat="server" ImageUrl='<%# XPath("ImageUrl") %>' AlternateText="IMAGE" 
                   ToolTip='<%# XPath("AlternateText") %>' /> 
             </ItemTemplate> 
          </telerik:RadRotator> 
          <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="XMLFile.xml"></asp:XmlDataSource> 
          <div> 
          </div> 
       </form> 
    </body> 
    </html> 


    You can examine the code above and if you still cannot get the RadRotator control to work properly please open a support ticket and send us a simple project that reproduce the problem. We will do our best to help.


    All the best,
    Fiko
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top