Hello
I'm trying to automatically redirect the user to another site after a timer expires, and the redirection just doesn't happen. I've found posts talking about stopping the timer and disabling SmartNavigation, but nothing helps.
If I redirect from the Form_Load() event, though, no problem. The browser goes to the new site. Any ideas?
Here's my code:
I'm trying to automatically redirect the user to another site after a timer expires, and the redirection just doesn't happen. I've found posts talking about stopping the timer and disabling SmartNavigation, but nothing helps.
If I redirect from the Form_Load() event, though, no problem. The browser goes to the new site. Any ideas?
Here's my code:
Code:
private void Page_Load(object sender, System.EventArgs e)
{
// this redirection works
Response.Redirect("[URL unfurl="true"]http://www.microsoft.com",false);[/URL]
}
private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
timer1.Stop();
Page.SmartNavigation = false;
// this redirection does not work; no exceptions are thrown
Response.Redirect("[URL unfurl="true"]http://www.microsoft.com",[/URL] false);
}