This is a migrated thread and some comments may be shown as answers.
converting an xmldatasource version to sqldatsource
1 Answer 6 Views
This is a migrated thread and some comments may be shown as answers.
Clive Hoggar
Top achievements
Rank 1
Clive Hoggar asked on 29 Nov 2018, 09:17 PM

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

 

1 Answer, 1 is accepted

Sort by
0
Clive Hoggar
Top achievements
Rank 1
answered on 03 Dec 2018, 05:26 PM
Solved! This code actually works fine but some other code was preventing images from showing.
Asked by
Clive Hoggar
Top achievements
Rank 1
Answers by
Clive Hoggar
Top achievements
Rank 1
Share this question
or