0
我在ASP得到了與routin問題MVC應用程序:The resource cannot be found.
ASP MVC路由的行爲
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)
做工精細
Ohhhhh。謝謝:)))工作4小時...需要休息。 –
很高興幫助;-) –