Nope. This is by design. When you send output to the browser, you actually send an HTTP Header and a HTTP Body. Cookies, Redirect statements, etc are placed in the header. The page contents are send in the body.
For technical reasons, the header must be sent before the body. So, as soon as you flush some content to the browser, the header must already have been sent, so you can't access or modify it anymore with a Response.Redirect statement.
You can, however, simulate this with some JavaScript. Instead of the Redirect statement, send some JavaScript that requests a new page using location.href.
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|