Url will be http://localhost:54088/UserAdmin/FindUser?UserId=COMPANY%5Ckarimf Server Error in '/' Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /UserAdmin/FindUser
Controller
public ActionResult FindUser(string UserId)
{
User user = db.Users.Find(UserId);
return View(user);
}
view
@if (Request.IsAuthenticated && User.IsInRole("Edit-Content")) {
@Html.ActionLink("Edit", "FindUser", "UserAdmin",
new { UserId = item.UserId }, new { @class = "btn btn-primary" })} |
@if (Request.IsAuthenticated && User.IsInRole("Delete-Content"))
{
@Html.ActionLink("Delete", "Delete", "UsersAdmin",
new { UserId = item.UserId }, new { @class = "btn btn-danger" })
}