Using a SQL-Datasource to populate the Rotator

2 posts, 0 answers
  1. Peter Ivanov
    Peter Ivanov avatar
    6 posts
    Member since:
    Oct 2009

    Posted 18 Nov 2009 Link to this post


    I'm having a problem populating my Rad Rotator using the traditional way of using a datasource in the ASP side of the code, this is what my code looks like.

    <telerik:RadRotator runat="server" ID="RadRotator1" RotatorType="AutomaticAdvance" ScrollDirection="Up" FrameDuration="7000" 
                    <asp:Image ID="imgAdBanner" runat="server" ImageUrl='<%# "~/ImageFilePath/" & Eval("ImageName") %>' 
    NavigateUrl='<%# Eval("LinkUrl") %>'  AlternateText='<%# Eval("AltText") %>' />
    <asp:SqlDataSource runat="server" ID="SqlDataSource1" 
        ConnectionString="<%$ ConnectionStrings : CS %>" 
        SelectCommand="SELECT ImageName, LinkUrl, AltText FROM RotatorImages">  

    Any advice will be greatly appreciated.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 18 Nov 2009 Link to this post

    Hai Peter,

    From the above code, I can see that you have not set the DataSourceID properly as SqlDataSource's. Try changing that and see whether it is working fine as expected.
    Also checkout the following links to know more on binding RadRotator to ASP DataSource components.

    hope this helps,
Back to Top