1. It raises the exception because the thread handling the current request is being aborted by the call to response.redirect. 2. The framework does handle this. 3. You may safely catch and ignore this exception.
4. Yes this is frustrating the first time it is encountered ;) Justin E. Pitts Technical Consultant Data and Application Integration Services Big Lots - World's Best Bargain Place! -----Original Message----- From: Moderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 9:32 AM To: [EMAIL PROTECTED] Subject: [ADVANCED-DOTNET] Exception raised by Response.Redirect While working on an ASP.NET app, I put a Response.Redirect inside a try block, wanting to go to a different page after a successful databaes update. This raised a ThreadAbortException exception. Turns out this is a documented feature. My questions are these: 1. Why does this raise an exception? 2. Does the Framework speacial case this? I routinely use Response.Redirect outside try blocks, and I never see an error page even though I am not handling the exception in any way. 3. Can I just catch this exception and do nothing with it, or will that cause other problems? Thanks. --d =================================== This list is hosted by DevelopMentorR http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor� http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com
