User1520731567 posted
Hi Baze72,
@Html.ActionLink(item.FirstName,
"Details",
"Employees",
new { id = item.ID },
null)
And the controller:
public ActionResult Details(int
id)
{//add a breakpoint on this line
Employee employee = db.Employees.Find(id);
if (employee ==
null)
{
return HttpNotFound();
}
return View(employee);
}
I suggest you could add breakpoint on highlight line,check if your id is passed over.
If no,maybe there are some wrong in your route,check your
RouteConfig.cs.
if id has value,check if green line has value,
if employee ==null,it do will return HttpNotFound;
Best Regards.
Yuki Tao