简体   繁体   English

Response.Redirect方法的endResponse参数的默认值是什么

[英]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 . HttpResponse.Redirect的endResponse参数的默认值为true

Calling Redirect is equivalent to calling Redirect with the second parameter set to true. 调用重定向相当于调用Redirect,第二个参数设置为true。

Redirect calls End which throws a ThreadAbortException exception upon completion. 重定向调用End,在完成时抛出ThreadAbortException异常。 This exception has a detrimental effect on Web application performance. 此异常对Web应用程序性能有不利影响。 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. 因此,建议您使用HttpResponse.Redirect(String, Boolean)重载而不是此重载HttpResponse.Redirect(String, Boolean)并为endResponse参数传递false ,然后调用CompleteRequest方法。 For more information, see the End method. 有关更多信息,请参阅End方法。

See this MSDN link for reference - https://msdn.microsoft.com/en-us/library/t9dwyts4%28v=vs.110%29.aspx 请参阅此MSDN链接以供参考 - https://msdn.microsoft.com/en-us/library/t9dwyts4%28v=vs.110%29.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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