简体   繁体   中英

What is the default value of endResponse parameter of Response.Redirect method

我想知道HttpResponse.Redirect Method (String, Boolean)方法的endResponse参数的默认值

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM