我有兩個控制器,這兩個叫AccountController
。其中之一,讓我們叫它Controller A
,在Area
叫Admin
和其他,讓我們叫它Controller B
,是不是在任何Area
(我想這意味着它是在默認Area
?)。 Controller B
有一個action method
調用Login
。我有一個Controller A
action method
,其此行重定向到行動中另一個控制器
return RedirectToAction("LogIn", "Account");
的問題是,我得到一個404
時因爲試圖重定向到一個不存在的action
在Controller A
此行得到執行。我想致電Controller B
中的action method
。這可能嗎?
可能重複http://stackoverflow.com/questions/7892094/mvc-redirect- to-index-from-another-controller) – musefan