This is a discussion on If I use Response.Redirect in try block exception occurred in c#, Why? within the C# Programming forums, part of the Software Development category; If I use Response.Redirect in try block exception occurred in c#, Why?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| In Normal Scenario, Response.End ends the Page Execution and thenthe excetion shifts tp Application_EndRequest.But when we Use Response.Redirect Method ,the Method shifting to Application_EndRequest does not occur because the Response.End Methodis called By the Response.Redirect Method Internally. So the Server Does not ends its Request and A Exception is Thrown To Avoid This, we can use overload, Response.Redirect(String url, bool endResponse) that passes false for the endResponse parameter to suppress the internal call to Response.End So that the Response.End Explicitly called after the Response.Redirect Method To exceute and End the Process Correctly. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is the difference between Server.Transfer and Response.Redirect?.. | H2o | ASP and ASP.NET Programming | 4 | 11-22-2007 05:25 AM |
| Exception "security block" while connecting to bluetooth device | S.Vinothkumar | Mobile Software Development | 13 | 11-10-2007 03:19 AM |
| Difference between Server.Transfer and Response.Redirect | Arun | ASP and ASP.NET Programming | 4 | 09-19-2007 10:52 PM |
| HTTP Web Response Exception - I cant able to trap. | prasannavigneshr | Windows Mobile | 27 | 09-19-2007 08:28 AM |
| What is the difference between Server.Transfer and Response.Redirect? Why would I cho | prasath | ASP and ASP.NET Programming | 1 | 07-19-2007 02:41 AM |