Skip to content

MvcHaack.Ajax not working on ASP.NET MVC 4 #8

Closed
vijayantkatyal opened this Issue Oct 12, 2012 · 1 comment

1 participant

@vijayantkatyal

Error Occured when go to url : -siteurl-/json/-json controller-

The RouteData must contain an item named 'action' with a non-empty string value.

@vijayantkatyal

Problem Solved by rewrite the routing url in asp.net mvc 4

instead of

routes.Add(new JsonRoute("json/{controller}"));

use:

routes.Add(new JsonRoute("json/{controller}")
{
Defaults = new RouteValueDictionary(new { action = "list", id = "" })
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.