converting an xmldatasource version to sqldatsource

2 posts, 0 answers
  1. Clive Hoggar
    Clive Hoggar avatar
    348 posts
    Member since:
    Nov 2008

    Posted 29 Nov 2018 Link to this post

    Hi Guys 

    I am trying to make my existing (working ) xmldatasource radrotator to an sqldatasource version, but struggling to make the random image show up

    Here is what I have; it seems like the string to pick up the image from the 'logos'  folder isn't right. What am I doing wrong?

    <telerik:radrotator ID="RadRotatorLogo" runat="server" DataSourceID="SqlDataSourceSponsors" Width="365px" Height="230px" ItemWidth="350px" ItemHeight="230px " FrameDuration="8000" RotatorType="SlideShow" SlideShowAnimation-Type="fade" BackColor="#FFFFFF" ScrollDirection="Down" EnableRandomOrder="True" Skin="Simple">
                                <ItemTemplate>
                                    <asp:Image ID="CustomerImage" runat="server" AlternateText=""

                                  ImageUrl='<%# "~/images/logos/" & Eval("fileName") %>'    

                                   ImageAlign="Middle"></asp:Image>
                                </ItemTemplate>
                                <SlideShowAnimation Duration="3000" Type="Fade" />
                            </telerik:radrotator>

                <asp:SqlDataSource ID="SqlDataSourceSponsors" runat="server" ConnectionString="<%$ ConnectionStrings:RotaryConnectionString %>" SelectCommand="SELECT [fileName] FROM [tblSponsors]"></asp:SqlDataSource>

     

    thanks

    Clive

     

  2. Clive Hoggar
    Clive Hoggar avatar
    348 posts
    Member since:
    Nov 2008

    Posted 03 Dec 2018 in reply to Clive Hoggar Link to this post

    Solved! This code actually works fine but some other code was preventing images from showing.
Back to Top