[英]What is the default value of endResponse parameter of Response.Redirect method
我想知道HttpResponse.Redirect Method (String, Boolean)
方法的endResponse参数的默认值
HttpResponse.Redirect的endResponse
参数的默认值为true
。
调用重定向相当于调用Redirect,第二个参数设置为true。
重定向调用End,在完成时抛出ThreadAbortException
异常。 此异常对Web应用程序性能有不利影响。 因此,建议您使用HttpResponse.Redirect(String, Boolean)
重载而不是此重载HttpResponse.Redirect(String, Boolean)
并为endResponse
参数传递false
,然后调用CompleteRequest
方法。 有关更多信息,请参阅End
方法。
请参阅此MSDN链接以供参考 - https://msdn.microsoft.com/en-us/library/t9dwyts4%28v=vs.110%29.aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.