I am trying to identify how to map a route for /News/5 to my news controller.
This is my NewsController:
public class NewsController : BaseController
{
You need to make sure your new route is before your default route, like so:
routes.MapRoute(
"NewsAbbr", // Route name
"{controller}/{id}", // URL with parameters
new { controller = "News", action = "Index", id = -1 } // Parameter defaults
);
routes.MapRoute(
"News", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "News", action = "Index", id = -1 } // Parameter defaults
);