Regarding (count down) timer for application in asp.net c#
<p>Hi
I have created online quiz. I have added Count-down timer,label for question &amp; radiobuttonlist for answers and next button for next question. I have code for timer but this timer gets start again when i click next button as i want count down timer for whole questions(Quiz).
Count down timer code(Javascript) is as follows:</p>

<pre><code>var hour=0;  //specify hours for counter
var min= '&lt;%= Session["timer"] %&gt;';      // specify minutes 

var second = '&lt;%= Session["second"] %&gt;';    // specify the seconds
var lab = 'cd';  // id of the entry on the page where the counter(for question) is to be inserted &amp; cd is span id in aspx page where i am displaying countdown timer

function start() 
{
    displayCountdown(setCountdown(hour,min,second),lab);
}
loaded(lab,start);
var pageLoaded = 0; 
window.onload = function() {pageLoaded = 1;}
function loaded(i,f) 
{
    if (document.getElementById &amp;&amp; document.getElementById(i) != null) 
        f(); 
    else if (!pageLoaded) 
        setTimeout('loaded(\''+i+'\','+f+')',100);
}
function setCountdown(hour,min,second) 
{
    if(hour&gt;0)
    min=min*hour*60;
    c = setC(min,second); 
return c;
} 
function setC(min,second) 
{
if(min&gt;0)
second=min*60*second;
return Math.floor(second);
}
function displayCountdown(countdn,cd) 
{
    if (countdn &lt; 0)
    {
        document.getElementById(cd).innerHTML = "Sorry, you are too late."; 
        __doPostBack('__Page');
    }
    else 
    {
        var secs = countdn % 60; 
        if (secs &lt; 10) 
            secs = '0'+secs;
        var countdn1 = (countdn - secs) / 60;
        var mins = countdn1 % 60; 
        if (mins &lt; 10) 
            mins = '0'+mins;
        countdn1 = (countdn1 - mins) / 60;
        var hours = countdn1 % 24;
        document.getElementById(cd).innerHTML = hours+' : '+mins+' : '+secs;
        setTimeout('displayCountdown('+(countdn-1)+',\''+cd+'\');',999);
    }
}
</code></pre>
