On Sun, 13 Jun 2004 04:37:40 +0200, Axel Dahmen <NO*****@NoOneKnows.de>
wrote:
Hi,
I'm wondering what is Response.Redirect(string) equivalent to:
Response.Redirect(string,true)
- or -
Response.Redirect(string,false)
?
The MSDN Library is unclear on this.
TIA,
Axel Dahmen
the first one:
http://support.microsoft.com/default...b;EN-US;312063
the boolean tells the code whether to stop the response at the point of
redirect, or not. By default, it is true, so a ThreadAbortException (I
believe) is thrown behind the scenes to signal to the framework to stop
processing the last request immediately (note this is important as any
code past that point could be run if it were set to false). For the
default value of true, you don't notice the exception of course, unless
you do a redirect inside of a try...catch block. Then you'd want to use
the overloaded method passing in false for 'end response' arg.
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET