A ThreadAbortException is thrown when Redirect is used - it's just how it
works. Why are you doing a catch(Exception e)? If your code can't "handle"
every exception, then I'd suggest not having the catch block there. If there's
a specific exception you know how to deal with, then use the catch (like
FormatException or SqlException for example). To be notified that there was
an unhandled exception (one you didn't catch) you should put a Application_Error
handler in global.asax; this is where your error logging should go.
-Brock
DevelopMentor
http://staff.develop.com/ballen I had the following code inside my app
try
{
// Open an ADO.NET db connection
// Do some db processing here
Response.Redirect("main.htm");
}
catch(Exception e)
{
}
The Response.Redirect("main.htm") state was generating the error
'mscorlib : Thread was being aborted'. But when I took that statement
out of the try..catch block it ran fine. Why does Ressponse.Redirect
cause an error inside a try..catch statement?
Thanks in advance