Call Response.End () after Response.Redirect ()

Do I need to call Response.End () after Response.Redirect (url)

Update

Thanks for all the answers. Since some answers say this is necessary, while others do not, I searched more and found the following comments in msdn :

Call Forwarding The end that throws a ThreadAbortException upon completion.

+7
source share
5 answers

Response.Redirect calls Response.End for you

I disagree with his good practice - this leads to a misleading code.

MSDN :

Call Forwarding The end that throws a ThreadAbortException upon completion.

HTTP laws explain that after sending a response, the server is completed (the code is no longer called)

+11
source

Response.Redirect allows you to call Response.End.

 Response.Redirect(url, true); 
+4
source

No need to call Response.End, in fact, if you think you need to finish the answer, use Response.Redirect overload (url, endResponse)

+2
source

Not if you pass true as the second parameter: http://msdn.microsoft.com/en-us/library/a8wa7sdt(v=vs.80).aspx

0
source

Good practice is needed or not to call Response.End () at the end of the response. It will not hurt anything either.

-one
source

All Articles