I have an Asp.Net Mvc website that has a listing controller. The route looks like this:
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional },
new string[] { "MySite.Web.Controllers" }
);
Pretty standard. Now I have a number of controller actions in my listing controller. I would like to be able to either go to /listing/84 and have it go to the Index action or to /listing/create, /listing/edit, /listing/favorite, or /listing/others and have it go to the the corresponding actions. For most of my routes this is already the case. This is my controller code:
public ActionResult Index(long? id)
{
// my code that never gets hit
}
Am I missing something?