Skip to main content

Posts

Showing posts with the label MVC 5 Routing with multiple optional parameters

MVC 5 Routing with multiple optional parameters

MVC 5 Routing with multiple optional parameters     public class RouteConfig     {         public static void RegisterRoutes( RouteCollection routes)         {             routes.IgnoreRoute( "{resource}.axd/{*pathInfo}" );             routes.MapRoute(                 name: "Default" ,                 url: "{controller}/{Action}/{id}/{type}" ,                 defaults: new { controller = "Home" , action = "Index" , id = UrlParameter .Optional, type = UrlParameter .Optional }          ...