【发布时间】:2012-05-28 13:11:40
【问题描述】:
我有两个控制器,都称为AccountController。其中一个,我们称之为Controller A,在Area 中,称为Admin,另一个,我们称之为Controller B,不在任何Area 中(我猜这意味着它在默认的@987654328 中@?)。 Controller B 有一个名为 Login 的 action method。我在Controller A 中有一个action method,其中有这一行
return RedirectToAction("LogIn", "Account");
问题是当这条线被执行时我得到一个404,因为试图重定向到Controller A中不存在的action。我想在Controller B 中拨打action method。这可能吗?
【问题讨论】:
标签: asp.net-mvc asp.net-mvc-3 c#-4.0 redirecttoaction