I have the following controller method:
public ActionResult GetResults(string viewToReturn, int resultsPerPage,
string classification = null, string sessionId = null, int? lastId= null)
{
...
}
Calling the method above via the following url:
http://localhost:63455/Home/GetResults?viewToReturn=grid&resultsPerPage=30
results in an exception thrown with this message:
A public action method 'GetResults' was not found on controller 'MyWebSite.Controllers.HomeController'.
and here is the RegisterRoutes:
......
routes.MapRoute("Home", "home/{action}/{*qualifier}",
new { controller = "Home", action = "Index", qualifier = UrlParameter.Optional });
......
routes.MapRoute("SearchTitle", "{*path}",
new { controller = "Home", action = "SearchTitle", path = UrlParameter.Optional });
Why am I getting this error and how do I fix it? Thanks!