Try-catch 中的 Server.Transfer : 线程中止异常

发布于 2024-09-26 01:24:23 字数 213 浏览 2 评论 0原文

等效

Response.Redirect("abc.aspx",false)

于我使用server.trans.trans.redirect.i false用作响应的第二个参数。redirect停止在尝试捕获块中停止接收螺纹bot型异常,

我想摆脱线程。当我在尝试捕获块中使用server.transferis时。有什么想法吗?

What is the equivalent of

Response.Redirect("abc.aspx",false)

when i use Server.Transfer instead of Response.Redirect.I use false as the second param of Response.Redirect to stop receiving the ThreadAbort exception in a try catch block

I want to get rid of the Thread.Abort exception when i use Server.Transferis in a try catch block. Any thoughts ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心头的小情儿 2024-10-03 01:24:23

请改用Server.Execute。正如将 false 传递给 Response.Redirect 一样,您必须确保在执行您所在方法(及其调用方法)中的其余代码时不会发生任何不良情况。

Use Server.Execute instead. Just as with passing false to Response.Redirect, you have to make sure that nothing undesirable happens when the rest of the code in the method you are in (and its calling methods) is executed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文