【发布时间】:2013-07-12 20:48:17
【问题描述】:
我的 asp mvc 应用程序中的例程有问题:The resource cannot be found.
Requested URL: /Admin/Users/Update
我的操作代码是:
[HttpGet]
public ActionResult UpdateUser(int userId)
{
-some code-
return View();
}
ActionLink 是:
@Html.ActionLink((string)fullName, "Update", "Users", new { userId = user.Id }, null)
路线:
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"Admin_default",
"Admin/{controller}/{action}/",
new { controller = "Units", action = "Units" },
new [] {"RSystem.Areas.Admin.Controllers"}
);
}
但其他动作,例如
public ActionResult Users(Role? role)
工作正常
【问题讨论】:
标签: asp.net-mvc asp.net-mvc-4 routing