Your ActionLink
calls don't pass the correct route values. The Edit, Details and Delete actions expect an id
parameter to be passed as a route value. You can do this as follows, assuming the Emp_id
is the id value you want to use:
@Html.ActionLink("Edit", "Edit", new { id=item.Emp_id }) |
@Html.ActionLink("Details", "Details", new { id=item.Emp_id }) |
@Html.ActionLink("Delete", "Delete", new { id=item.Emp_id })
In your example, you have these values commented so they won't be passed as route values and thus no correct route will be generated.