By default, Response.Redirect()
aborts the current thread. Naturally, this throws a ThreadAbortException
. It can be prevented by passing a false
to Response.Redirect()
, which won't abort the current thread.
Be aware of what that means, however. If the thread is not aborted, the code following the Response.Redirect()
will continue to execute. Control your logic flow accordingly. (This is often done with return
statements and other flow control directives following a redirect.)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…