Dan,
 
There's an overload for HTTPResponse.Redirect that takes a bool argument 
(""endResponse). Specifying a value of "false" when redirecting from inside Try Block 
should alleviate the problem.
 
Here's a little more information on it in case you haven't seen this already:
 
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q312/6/29.asp&NoWebContent=1
 
HTH,
Mike Diehl

        -----Original Message----- 
        From: Dan Hurwitz [mailto:[EMAIL PROTECTED] 
        Sent: Wed 8/27/2003 9:32 AM 
        To: [EMAIL PROTECTED] 
        Cc: 
        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 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
        

Reply via email to