【发布时间】:2014-06-16 21:29:18
【问题描述】:
我有 ASP.NET MVC 应用程序。 我希望我的应用程序从
重定向example.com/Register
到
example.com/Account/Register
我怎样才能用路线做到这一点?只为这一项任务制作控制器对我来说毫无意义
public class RegisterController : Controller
{
public ActionResult Index()
{
return RedirectToAction("Register", "Account");
}
}
【问题讨论】:
-
Phil Haack's RouteMagic 能解决您的问题吗?
标签: asp.net asp.net-mvc asp.net-mvc-4 asp.net-mvc-5 asp.net-mvc-routing