I want to know the default value of endResponse parameter of HttpResponse.Redirect Method (String, Boolean)
method
Response. Redirect sends an HTTP request to the browser, then the browser sends that request to the web server, then the web server delivers a response to the web browser. For example, suppose you are on the web page "UserRegister. aspx" page and it has a button that redirects you to the "UserDetail.
Redirect(String) Redirects a request to a new URL and specifies the new URL. Redirect(String, Boolean) Redirects a client to a new URL. Specifies the new URL and whether execution of the current page should terminate.
The default value of endResponse
parameter of HttpResponse.Redirect is true
.
Calling Redirect is equivalent to calling Redirect with the second parameter set to true.
Redirect calls End which throws a ThreadAbortException
exception upon completion. This exception has a detrimental effect on Web application performance. Therefore, it is recommended that instead of this overload you use the HttpResponse.Redirect(String, Boolean)
overload and pass false
for the endResponse
parameter, and then call the CompleteRequest
method. For more information, see the End
method.
See this MSDN link for reference - https://msdn.microsoft.com/en-us/library/t9dwyts4%28v=vs.110%29.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With