我一直在寻找某种方法来重定向到Index
从另一个控制器查看。
public ActionResult Index()
{
ApplicationController viewModel = new ApplicationController();
return RedirectToAction("Index", viewModel);
}
这就是我现在尝试的。现在我得到的代码有一个ActionLink
链接到我需要的页面Redirect
too.
@Html.ActionLink("Bally Applications","../Application")
使用也采用控制器名称的重载...
return RedirectToAction("Index", "MyController");
and
@Html.ActionLink("Link Name","Index", "MyController", null, null)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)