<p>Could you recommend me a way to place a coundown timer on ASP.NET page?</p>

<p>Now I use this code:</p>

<p><strong>Default.aspx</strong></p>

<pre><code>&lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
&lt;/asp:ScriptManager&gt;
&lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt;
&lt;ContentTemplate&gt;
    &lt;asp:Label ID="Label1" runat="server"&gt;60&lt;/asp:Label&gt;
    &lt;asp:Timer ID="Timer1" runat="server" Interval="1000" 
        ontick="Timer1_Tick"&gt;
    &lt;/asp:Timer&gt;
&lt;/ContentTemplate&gt;
&lt;/asp:UpdatePanel&gt;
</code></pre>

<p><strong>Default.aspx.cs</strong></p>

<pre><code>protected void Timer1_Tick(object sender, EventArgs e)
{
    int seconds = int.Parse(Label1.Text);
    if (seconds &gt; 0)
        Label1.Text = (seconds - 1).ToString();
    else
        Timer1.Enabled = false;
}
</code></pre>

<p>But it is traffic expensive. I would prefer pure client-side method. Is it possible in ASP.NET? </p>

You might add something like this in your .aspx page
```
```
<form name="counter"><input type="text" size="8" 
name="d2"></form> 

<script> 
<!-- 
// 
 var milisec=0 
 var seconds=30 
 document.counter.d2.value='30' 

function display(){ 
 if (milisec<=0){ 
    milisec=9 
    seconds-=1 
 } 
 if (seconds<=-1){ 
    milisec=0 
    seconds+=1 
 } 
 else 
    milisec-=1 
    document.counter.d2.value=seconds+"."+milisec 
    setTimeout("display()",100) 
} 
display() 
--> 
</script>
```
```
Found
here