How can I implement previous/next buttons in an image gallery?

intedsMen

New Member
I have a GridView populate from a database. When i click an image in the GridView, it opens in a new image called \[code\]imgFull\[/code\]. This image may explain more:
KHXPM.jpg
I want to put next and previous button to get in my div the next image from database.I want to develop it in jQuery or JavaScript. This is a sample of my code:\[code\]<div> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" Font-Names="Arial"> <Columns> <asp:BoundField DataField="ID" HeaderText="ID" /><asp:BoundField DataField="FileName" HeaderText="Image Name" /><asp:TemplateField HeaderText="Preview Image"> <ItemTemplate> <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%# "images/" +Eval("FilePath") %>' Width="100px" Height="100px" Style="cursor: pointer" OnClientClick = "return LoadDiv(this.src);"/> </ItemTemplate></asp:TemplateField> </Columns></asp:GridView> </div> <div id="divBackground" class="modal"> </div> <div id="divImage" class = "info"> <input id="btnNext" type="button" value="http://stackoverflow.com/questions/13786943/next" /> <input id="Button1" type="button" value="http://stackoverflow.com/questions/13786943/left" /> <input id="Button2" type="button" value="http://stackoverflow.com/questions/13786943/right" /> <img id="imgLoader" alt="" src="http://stackoverflow.com/questions/13786943/~/images/loader.gif" /> <img id="imgFull" runat="server" alt="" src="" style="height: 500px;width: 590px"/> <input id="btnClose" type="button" value="http://stackoverflow.com/questions/13786943/close" onclick="HideDiv()"/> </div>\[/code\]Would someone help me?
 
Back
Top