I've trouble solving a 404 error:
Default Route in Global.asax.cs:
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
VideoController.cs:
[HttpPost]
public ActionResult Save(int id)
{
try
{
return Json(new
{
ID = "0"
});
}
catch
{
return new HttpStatusCodeResult(418, "I'm a teapot");
}
}
ActionLink in my view, Create.cshtml:
@Ajax.ActionLink("GoSave", "Save", "Video", new { id = 1 },
new AjaxOptions { OnFailure = "Error", OnSuccess = "Saved",
HttpMethod = "POST" })
The url of the actionlink is rendered as expected: /Video/Save/1
When I click on the link I get an 404.
What is it I'm not seeing?