Rotator only showing first image on XML file

2 posts, 0 answers
  1. Tania
    Tania avatar
    6 posts
    Member since:
    Aug 2007

    Posted 04 Dec 2008 Link to this post

    I have a rotator that used to work before I upgraded to Q32008.
    It only rotates first image.

    here is the code:

     

     

     

    <telerik:RadRotator ID="RadRotator1"

     

     

                        runat="server"

     

     

                        DataSourceID="XmlDataSource1"

     

     

                        Skin="Web20"

     

     

                        FrameDuration="6000"

     

     

                        Height="300px"

     

     

                        ScrollDuration="600"

     

     

                        Width="650px" >

     

     

     

     

     

     

            <ItemTemplate>

     

     

     

                        <img alt="<%# XPath("/Files/item/title") %>" src="Images/<%# XPath("/Files/item/filename") %> " />

     

     

            </ItemTemplate>

     

     

     

     

     

     

    </telerik:RadRotator>

     

     

     

     

     

     

    <asp:XmlDataSource ID="XmlDataSource1" runat="server"

     

     

    DataFile="~/App_Data/ImageRotator.xml" >

     

     

    </asp:XmlDataSource>

     

    my xml file looks like this

     

     

     


     

    <?

     

    xml version="1.0" encoding="utf-8" ?>

     

    <

     

    Files>

     

    <

     

    item>

     

    <

     

    filename>2008.jpg</filename>

     

    <

     

    title>2008 Text</title>

     

    </

     

    item>

     

    <

     

    item>

     

    <

     

    filename>banner4.jpg</filename>

     

    <title>banner Text</title></

     

    item>

     

    <

     

    item>

     

    <

     

    filename>04.png</filename>

     

    <title>04 Text</title>
    </

     

    item>

     

    </

     

    Files>

     

    can somebody give me a hint on what am I missing?

     

     

     

     

     


    thanks

     

  2. Tania
    Tania avatar
    6 posts
    Member since:
    Aug 2007

    Posted 05 Dec 2008 Link to this post

    I got it.
    I changed the XPath expresion to <img alt="<%# XPath("title") %>" src="Images/<%# XPath("filename")
    Thanks
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top