Click here to Skip to main content
15,846,144 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Sir m trying to build a carousel that slider images are bind from database.i'hv taken a div and inside that div i'hv taken a datalist control and inside item template i bind images from is displaying the images properly but i want to move images from right to left and if i add new image in database table that image should automatically added in slider..pls help..thanks in advance..m pasting my code.

<div class="Builder" id="Builderlogo">
        <h3>Our Associates</h3>
                <div id="inner">
                    <asp:DataList ID="BuildersImage" runat="server" RepeatDirection="Horizontal">
                            <div style="float: left">
                                <asp:Image ID="Img" runat="server" ImageUrl='<%#Eval("ImagePath")%>' Width="120"
                                    Height="106" Style="border: thin solid #CCCCCC; margin-left: 5px;" BorderStyle="None" />
Updated 30-Jul-17 23:38pm
Kaushikhalvadiya 2-Nov-12 14:12pm    
why u r using datalist?

use html ul in asp file instead of datalist.

ul having multiple li..

and one image in each li..

it'll work fine..

corausel'll manage all auto..
Raj.Rautela 3-Nov-12 5:01am    
can u give me an example how to use ul li..and bind images from database to li..
Raj.Rautela 3-Nov-12 5:05am    
m storing image path in database and image in a folder in the root file..can u pls tell me what should i to bind images to li dynamically.
ZurdoDev 2-Nov-12 15:27pm    
Where's the code? I see markup but no code.

1 solution

Use jQuery.carouFredSel plugin[^] responsive jQuery slider that is very simple to configure (and also works on touch devices like an ipad). Here is a sample i created a while back on jsfiddle [^]

Hope this helps
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900