I have the following route on my mvc 5 project. When I try to access to the action by url, it throws an 404 error page. What am I doing wrong?
RouteConfig.cs
....
routes.MapRoute
(
name: "EventMoneyMovements2",
url: "eventos/{eventID}/movimientos",
defaults: new { controller = "EventMoneyMovements", action = "ListByEvent", eventID = UrlParameter.Optional }
);
Controller
public class EventMoneyMovementsController : Controller
{
//
// GET: /EventMoneyMovements/
public ActionResult Index()
{
return View();
}
public ActionResult ListByEvent(int? eventID)
{
return View();
}
}