Timer won't reset to 30 mins - everytime I go back to this page,the timer still is runnng
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/12734366/does-anyone-knows-how-to-fix-thismy-timer-wont-reset-to-30mins-whenever-i-go-b">Does anyone knows how to fix this?My Timer won&#39;t reset to 30mins whenever I go back to the web page</a>  </p>
</blockquote>



<p>Here's my code i hope someone can help me,thank you </p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        Timer1.Enabled = true;
        if (Session["CountdownTimer"] == null )
        {
            Session["CountdownTimer"] = new CountDownTimer(TimeSpan.Parse("00:30:00"));
            (Session["CountdownTimer"] as CountDownTimer).Start();
        }
    }
}

protected void Timer1_Tick(object sender, EventArgs e)
{
    if (Session["CountdownTimer"] != null)
    {
        if (Label1.Text != "00:00:00")
        {
            Label1.Text = (Session["CountdownTimer"] as CountDownTimer).TimeLeft.ToString();
            Session["time"] = Label1.Text;
        }
        else if((Session["CountdownTimer"] as CountDownTimer).TimeLeft.Seconds &lt;= 0)
        {
            (Session["CountdownTimer"] as CountDownTimer).Stop();
            Timer1.Enabled = false;
            Response.Redirect("timer.aspx");
        }
    }
}

public class CountDownTimer
{
    public TimeSpan TimeLeft;
    System.Threading.Thread thread;
    public CountDownTimer(TimeSpan original)
    {
        this.TimeLeft = original;
    }
    public void Start()
    {
        // Start a background thread to count down time
        thread = new System.Threading.Thread(() =&gt;
        {
            while (true)
            {
                System.Threading.Thread.Sleep(1000);
                TimeLeft = TimeLeft.Subtract(TimeSpan.Parse("00:00:01"));

            }
        });
        thread.Start();
    }

    public void Stop()
    {
        // Start a background thread to count down time
        thread = new System.Threading.Thread(() =&gt;
        {
            while (true)
            {
                System.Threading.Thread.Sleep(1000);
                TimeLeft = (TimeSpan.Parse("00:00:00"));

            }
        });
        thread.Abort();
    }
}
</code></pre>
