:) hi everybody,

im newer in asp.net. today, im trying to bind my data to the Nivo Slider by the Data List. The code is like this:

<div class="slideshow">
            <div id="slider" class="nivoSlider">
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                    SelectCommand="SELECT * FROM [SLIDEIMAGE]"></asp:SqlDataSource>
                <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1">
                <ItemStyle />
                <ItemTemplate>
                <img src="<%# Eval("IMAGENAME", "images/slide/{0}") %>" width="971" height="233" title="<%# Eval("IMAGEDESCRIPTION") %>" alt="<%# Eval("IMAGEID") %>" />
                </ItemTemplate>
                </asp:DataList>
</div>
            <script type="text/javascript" src="Scripts/jquery.nivo.slider.js"></script>
            <script type="text/javascript">
                $(window).load(function () {
                    $('#slider').nivoSlider();
                });
            </script>
        </div>

But the problem is Nivo slider can only load the first record in my database and show it into slider. even though in my db has a lot of records... so i want to know that can i have any way else to bind my data to the Nivo Slider which make the Nivo Slider can load all the records from db?

Thanks a lot :) - please help me in this problem !

Recommended Answers

All 5 Replies

have you tested without Nivo Slider binding records in Datalist ?

i already test :) it work normaly. just only when i bind my data to Nivo, the problem appear.. :)

anyone can help me plz :(

finally i solved it. so i wanna tell you guys to know 2.
i change the Datalist to use Repeater Control and it is working now. :)) :x

thanks!bro !

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.