ASP.NET 2.0 (NEW BUG)

A

Amelyan

Did you know that every time you do Response.Redirect, it thrown an
exception

System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpResponse.Redirect(String url, Boolean endResponse)
at System.Web.HttpResponse.Redirect(String url)
at Default2.imgButton_Click(Object sender, EventArgs e)

You just don't see it because your Response.Redirect is not in try/catch
block. Try putting your Response.Redirect in try/catch block and you will
see the problem.

If anyone has an explanation, more than welcome to share.

Thanks,
-Amelyan
 
S

Shawn

Hi.
This is not a bug, it is there by design to ensure that the execution on the
page stops. If you want you can prevent the execution from stopping:
http://support.microsoft.com/kb/312629/EN-US/

Shawn


Did you know that every time you do Response.Redirect, it thrown an
exception

System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpResponse.Redirect(String url, Boolean endResponse)
at System.Web.HttpResponse.Redirect(String url)
at Default2.imgButton_Click(Object sender, EventArgs e)

You just don't see it because your Response.Redirect is not in try/catch
block. Try putting your Response.Redirect in try/catch block and you will
see the problem.

If anyone has an explanation, more than welcome to share.

Thanks,
-Amelyan
 
D

Daniel TIZON

Amelyan said:
Did you know that every time you do Response.Redirect, it thrown an
exception

System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpResponse.Redirect(String url, Boolean endResponse)
at System.Web.HttpResponse.Redirect(String url)
at Default2.imgButton_Click(Object sender, EventArgs e)

You just don't see it because your Response.Redirect is not in try/catch
block. Try putting your Response.Redirect in try/catch block and you will
see the problem.

If anyone has an explanation, more than welcome to share.

Thanks,
-Amelyan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top