public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"InvoicePrint",
"Invoice/Print/{id}",
new { controller = "Invoice", action = "Print", id = UrlParameter.Optional }
);
routes.MapRoute(
"InvoiceDelete",
"Invoice/{action}/{type}/{id}",
new { controller = "Invoice", action = "Delete" }
);
routes.MapRoute(
"InvoiceIndex",
"Invoice/{action}/{type}",
new { controller = "Invoice", action = "Index" }
);
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
}