title: How to redirect to action result from timer elapsed event in mvc
body: <p>I  have scenario where i need to redirect to new action result on timer elapsed event, here is my code, its not working currently.</p>
  
  <pre><code>   public ActionResult ExistingClientConfirmation(AppointmentRequest model, FormCollection collection)
          {
              var appointment = AppointmentRequest.GetCurrent();
  
            try
              {
                  if (!ValidateAppointmentNotBooked(appointment))
                  {
                      return indexAction(appointment);
                  }
                  ValidateSession(appointment);
                  if (collection != null)
                  {
                      model.TimeInterval = collection["hdnTimeInterval"];
                      System.Timers.Timer aTimer = new System.Timers.Timer();
                      aTimer.Elapsed += (sender, e) =&gt; OnTimedEvent(sender, e, appointment);
                      aTimer.Interval = 5000;
                      aTimer.Enabled = true;
                  }
                  if (model != null)
                  {
                      appointment.TimeInterval = model.TimeInterval;
                      appointment.Client = model.Client;
                  }
                  return RedirectToAction("ExistingClientConfirmation");
  
              }
              catch (Exception ex)
              {
                  return HandleAndRedirectException(ex);
              }
          }
  
   public void OnTimedEvent(object source, ElapsedEventArgs e,AppointmentRequest appointment)
          {
              HomePage(appointment);
          }
  
          public ActionResult HomePage(AppointmentRequest appointment)
          {
              return indexAction(appointment);
          }
  </code></pre>
  
  <p>during debug i saw its hitting the elapsed event for every five seconds, but not redirecting. Any help please?</p>
  
  <p>Thanks in advance.</p>