Есть идеи, почему эта ссылка не найдена?
context.MapRoute(null, "Admin/CompanyUserDelete/{userprofileid}", new { controller = "Admin", action = "CompanyUserDelete", userprofileid = UrlParameter.Optional });
Она определяется с помощью класса AreaRegistration.
public class AdminAreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{
return "Admin";
}
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(null, "Admin", new { controller = "Admin", action = "Index" });
context.MapRoute(null, "Admin/Users", new { controller = "Admin", action = "CompanyUsers" });
context.MapRoute(null, "Admin/Users/Create", new { controller = "Admin", action = "CreateUser" });
context.MapRoute(null, "Admin/Users/{userprofileid}", new { controller = "Admin", action = "CompanyUser" });
context.MapRoute(null, "Admin/CompanyUserDelete/{userprofileid}", new { controller = "Admin", action = "CompanyUserDelete", userprofileid = UrlParameter.Optional });
context.MapRoute(null, "Admin/Users/{userprofileid}/Photo", new { contro
ller = "Admin", action = "UserImage" });
}
Вот ссылка не найдена.
@Html.ActionLink("Delete", "CompanyUserDelete", "Admin", new { area = "Admin", userprofileid = userItem.UserProfileId }, null)