System.Timers.Timer not working every 5 minutes
<p>I have a method which must be run every 5minutes in order to show latest data in gridview.</p>

<p>I was experimenting with System.Timers.Timer and the following is my code:</p>

<pre><code> protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            lblError.Text = "";

            t = new System.Timers.Timer(300000);//every 5min = 300000
            t.Enabled = true;
            t.Elapsed += new ElapsedEventHandler(t_Elapsed);

            if (!Page.IsPostBack)
            {
                //t = new System.Timers.Timer(300000);//every 5min = 300000
                //t.Enabled = true;
                //t.Elapsed += new ElapsedEventHandler(t_Elapsed);

                floor = ddFloors.SelectedValue.ToString();
                GenerateStatus();
            }
        }
        catch (Exception ex)
        {
            lblError.Text = ex.Message; 
        }
    }


  void t_Elapsed(object sender, ElapsedEventArgs e)
    {
        try
        {
            //Response.Redirect("Home.aspx");
            floor = ddFloors.SelectedValue.ToString();
            GenerateStatus();
        }
        catch (Exception ex)
        {
            lblError.Text = ex.Message;
        }
    }
</code></pre>

<p>the problem is that  after 5minutes it is not going to t_Elapsed. Note this should keep being done at all times not just for once.  any help pls?</p>
