Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Sir,

I am using timer Control in asp.net website which shows left exam time in Hour ,Minute and seconds
but the problem is when i m scrolling page downwards because of timer scroll moved upwards with each timer tick

below is the asp.net code snippet...

XML
<asp:UpdatePanel ID="UpdatePanel1" runat="server"  >
          <Triggers>
    <asp:AsyncPostBackTrigger ControlID="Timer1"  />
  </Triggers>
          <ContentTemplate>
          <table cellpadding="0" cellspacing="0">
          <tr>
          <td> <b>Time Left :</b> </td>
          <td>
          <asp:Timer ID="Timer1" runat="server">
        </asp:Timer>
               <asp:Label ID="hourLabel" runat="server" Font-Bold="True" Font-Size="Medium"
               ForeColor="#CC0000" Text="00"></asp:Label>
              :<asp:Label ID="minuteLabel" runat="server" Font-Bold="True" Font-Size="Medium"
           ForeColor="#CC0000" Text="0"></asp:Label>
              :<asp:Label ID="timerLabel" runat="server" Font-Bold="True" Font-Italic="False"
           Font-Size="Medium" ForeColor="#CC0000"></asp:Label>

          </td>
          </tr>
          </table>
            </ContentTemplate>

        </asp:UpdatePanel>

please help me why it is happening.
I am badly stuck in this problem since 2 days
Posted

1 solution

You might want to try MaintainScrollPositionOnPostback="true" on your page directive to keep the scroll position of the page.

You can read more from MSDN link[^].

Good luck,
OI
 
Share this answer
 
Comments
ahsan.subiya 4-Mar-15 23:52pm    
I have tried that solution but no result
Orcun Iyigun 5-Mar-15 8:05am    
Please look deeper into this google search. I am pretty sure you will find a remedy. http://goo.gl/BqPAgy

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