Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to implement timer in asp.net application?

How to implement timer in asp.net application?

Scheduled Pinned Locked Moved ASP.NET
tutorialquestioncsharpasp-nethelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Raheem MA
    wrote on last edited by
    #1

    Hi friends... We are developing online exam webpage using asp.net. When the exam starts (When page loads at the first time), duration of test will be displayed( for example: for 30.00). As the time passes on the duration would be decreased like 29.59, 29.58.... We are displaying one question per page. When user clicks on next button for next question, the timer is getting refreshed like displaying 30.00 again. we are displaying time in

    tag client side. The issue is the timer value should not be refreshed when the user clicks on next button or previous button. Please shed some light on this so that I can get rid of this issue. Thank you, Shah_Tech

    D L 2 Replies Last reply
    0
    • R Raheem MA

      Hi friends... We are developing online exam webpage using asp.net. When the exam starts (When page loads at the first time), duration of test will be displayed( for example: for 30.00). As the time passes on the duration would be decreased like 29.59, 29.58.... We are displaying one question per page. When user clicks on next button for next question, the timer is getting refreshed like displaying 30.00 again. we are displaying time in

      tag client side. The issue is the timer value should not be refreshed when the user clicks on next button or previous button. Please shed some light on this so that I can get rid of this issue. Thank you, Shah_Tech

      D Offline
      D Offline
      Dinesh Mani
      wrote on last edited by
      #2

      Why don't you use ajax panel to diplay the date and put the timer outside the update panel? If you cannot use ajax for some reason or the other, then check if you can get the current value of the timer on the post back and set it as the timer starting value in the next page. Otherwise, use frames! Not advisable! HTH!!

      1 Reply Last reply
      0
      • R Raheem MA

        Hi friends... We are developing online exam webpage using asp.net. When the exam starts (When page loads at the first time), duration of test will be displayed( for example: for 30.00). As the time passes on the duration would be decreased like 29.59, 29.58.... We are displaying one question per page. When user clicks on next button for next question, the timer is getting refreshed like displaying 30.00 again. we are displaying time in

        tag client side. The issue is the timer value should not be refreshed when the user clicks on next button or previous button. Please shed some light on this so that I can get rid of this issue. Thank you, Shah_Tech

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        You need to keep the time value safe. This can be done as 1. Keep the hidden TextBox(Style="display:none") on the web page 2. Save the initial value of exam in the text box 3. For your timer control, fetch the timer value from this text box, subtract the value, display it to user and save the reduced value back in the text box. 4. When user clicks on the next button, fetch the value from the text box, pass it to the next page, save it in Hidden text box and start the timer from value in text box. I think this will help you.

        Regards Aman Bhullar www.arlivesupport.com[^]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups