Asp.net

從一個區域的動作重定向到“根”區域中的動作?

  • January 13, 2010

我使用最新版本的 ASP.Net MVC 2 RC。

我的問題是,如何從“部落格”區域中的一個操作重定向到應用程序“根”中存在的主控制器中的索引操作(無區域)?

我試過了:

return RedirectToAction("index", "home");

但這會重定向到**/Blog/home**,其中 Blog 是我所在區域的名稱。

嘗試這個:

return RedirectToAction("index", "home", new { area = "" });

引用自:https://stackoverflow.com/questions/2059357