0

I've a repeater ASP.NET control that contain an image slider that display 3 images every 10 sec by random from DB.I used a UpdatePanel ASP.NET control to reload this repeater .every things is OK, but I've a problem, when passed 10 seconds page is refresh! and i don't want to refresh page.How to fix this problem?
this is ASP.NET code:

<div id="middleSliderArea">
        <div class="pikachoose">
            <ul id="pikame">
                <asp:Repeater ID="Repeater1" runat="server">

                    <ItemTemplate>
                        <li>
                            <asp:UpdatePanel runat="server" ID="UpdatePanel1">
                                <ContentTemplate>
                                    <asp:Timer runat="server" ID="Timer1" Interval="10000" OnTick="Timer1_Tick"></asp:Timer>
                                    <a href='<%#"MoreInfo.aspx?id="+Eval("ID") %>'>
                                        <img runat="server" src='<%#Eval("Image") %>' /></a><span><%#Eval("Brief") %></span>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </li>
                    </ItemTemplate>
                </asp:Repeater>
            </ul>
        </div>
    </div>  

and you can see this effect here after 10 seconds.

Hamid Talebi
  • 1,298
  • 2
  • 24
  • 42

1 Answers1

0

You need to get all images ID's from DB to client Side (you use JSON object) at the beginning , after page load. Then use "setInterval javascript method" and call another Javascript Method (for examle changeImage() ).

In changeImage() method you select img elements in the repeater than you can change the values and images. I know the explanation is not enought for you right now , if you need more I can help you ..

KnowGe
  • 305
  • 3
  • 10