asp.net - Using 'UpdatePanel' still takes my page to the top where there is a slideshow -


i have slideshow @ top of page , form @ bottom. image in slideshow changes,it takes me top of page. can't fill form or @ bottom. looks keeps posting page again, have taken necessary actions avoid that.

here controls:

      <asp:scriptmanager id="scriptmanager1" runat="server">         </asp:scriptmanager>             <asp:updatepanel id="updatepanel1" runat="server">                 <contenttemplate>                 <asp:timer id="timer1" runat="server" interval="3000"    ontick="timer1_tick">                 </asp:timer>                 <asp:image id="image1" height="388px" width="936px" runat="server" />                     </contenttemplate>             </asp:updatepanel> 

and here code-behind:

 protected void timer1_tick(object sender, eventargs e) {     setimageurl(); } private void setimageurl() {     random _rand = new random();     int = _rand.next(1, 5);     image1.imageurl = "~/slideshow/" + i.tostring() + ".jpg"; } 

try

<asp:scriptmanager id="scriptmanager1" runat="server">         </asp:scriptmanager>             <asp:updatepanel id="updatepanel1" runat="server">                 <contenttemplate>                 <asp:timer id="timer1" runat="server" interval="3000"    ontick="timer1_tick">                 </asp:timer>                 <asp:image id="image1" height="388px" width="936px" runat="server" />                     </contenttemplate> <triggers>             <asp:postbacktrigger controlid="timer1" />         </triggers>             </asp:updatepanel> 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -