[英]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.