title: how to create 2 minute countdown timer using asp.net
body: <p>i want to create a 2 minute timer under text box using Asp.net, i wanted the timer to be in a label under the text box, so i wrote this code in the control page after double click in the timer icon:</p>
  <pre><code> int seconds = int.Parse(Label1.Text);
          if (seconds &gt; 0)
  
  
              Label1.Text = (seconds - 1).ToString(&quot;mm:ss&quot;);
  
          else
              Timer1.Enabled = false;
  </code></pre>
  <p>And this code in the aspx file:</p>
  <pre><code>&lt;span &quot;CodeAsk&quot;&gt;ألم تتلقى الرمز ؟&lt;/span&gt;&lt;asp:Label ID=&quot;Label1&quot; runat=&quot;server&quot; text=&quot;2&quot;&gt;&lt;/asp:Label&gt;
          &lt;asp:Timer ID=&quot;Timer1&quot; runat=&quot;server&quot; OnTick=&quot;Timer1_Tick&quot; Interval=&quot;120000&quot;&gt;&lt;/asp:Timer&gt;
  </code></pre>
  <p>but it's not working, what is the problem with my code?</p>