【发布时间】:2016-08-22 03:36:31
【问题描述】:
我尝试从函数 BeginExecuteCore 重定向到另一个控制器 all 我的控制器继承了函数 BeginExecuteCore ,如果发生某些事情,我想做一些逻辑,所以重定向到“XController”
怎么做?
编辑:
巴尔德: 我使用函数 BeginExecuteCore 我不能使用 Controller.RedirectToAction
protected override IAsyncResult BeginExecuteCore(AsyncCallback callback, object state)
{
//logic if true Redirect to Home else .......
return base.BeginExecuteCore(callback, state);
}
【问题讨论】:
-
虽然您的问题缺乏细节,但您可以阅读 Controller.RedirectToAction 方法。
标签: asp.net-mvc asp.net-mvc-routing asp.net-mvc-5