I have the below code in my ASP.net page:
Response.StatusCode = 404
Response.Write(strResult)
Response.End()
The code above throws "An exception of type 'System.Threading.ThreadAbortException' occurred and was caught."
Can anyone tell me the reason why? And do I solve this.
thanks
Calling Response.End() from any child object of the page will most likely cause the 'System.Threading.ThreadAbortException' exception.
Please read this for a full explaination of why this is happening and methods to avoid/deal with the exception.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With