I have created one-timer. After timer invokes I need to redirect to another page.
Please help me.
My Code :
System.Timers.Timer myTimerfortodolist;
void Application_Start(object sender, EventArgs e)
{
myTimerfortodolist = new System.Timers.Timer();
myTimerfortodolist.Interval = 60000;//86400000 milisecond is equal to 24;
myTimerfortodolist.AutoReset = true;
myTimerfortodolist.Elapsed += new System.Timers.ElapsedEventHandler(myTimer_TODO);
myTimerfortodolist.Enabled = true;
}
//create for check send Interval from Reminder Config within 5 minute
public void myTimer_TODO(object source, System.Timers.ElapsedEventArgs e)
{
if (//Condition//)
{
Response.Redirect("~/Authorize.aspx");
}
}
Response is not available in this context.
I am Redirecting from Page to another and timer is running at each 1 min so I am unable to get Current HttpContext in delegate method