After creating controllers, for instance, like in example which I described here, and you want to "extend" index controller with additional parameter, then you have to introduce new router. In my case, in RouteConfig.cs (\MasterDetailDataTables\MasterDetailDataTables\App_Start\RouteConfig.cs) I did something like this:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
//routes.MapRoute(
// name: "Default",
// url: "{controller}/{action}/{id}",
// defaults: new { controller = "MasterDetail", action = "Index", id = UrlParameter.Optional }
//);
routes.MapRoute(
name: "MasterDetail",
url: "{controller}/{action}/{category}",
defaults: new { controller = "MasterDetail", action = "Index", category = UrlParameter.Optional }
);
}
As you can see, I commented default one, and added new one, where instead id I wrote category. Also in this line:
defaults: new { controller = "MasterDetail", action = "Index", category = UrlParameter.Optional }
Category is bold because I already forgot to change it in there part as well :)
From here.