title: Registering Multiple Routes in MVC asp.net
body: <p>I want to map several routes in MVC that have the parameters in different orders:</p>
  
  <pre><code>localhost:1010/abcd/home/index
  localhost:1010/home/index/abcd
  
  id=abcd
  controller=home
  action=index
  </code></pre>
  
  <p>I tried the code below, but it doesn't work.</p>
  
  <pre><code>public static void RegisterRoutes(RouteCollection routes)
  {
      routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  
      routes.MapRoute(
          "ShoppingManagment",
          "{id}/{controller}/{action}",
          new { controller = "ShoppingManagment",
              action = "ShoppingManagment", id = UrlParameter.Optional });
  
  
      routes.MapRoute(
          name: "Default",
          url: "{controller}/{action}/{id}",
          defaults: new { controller = "Home",
              action = "Index", id = UrlParameter.Optional }
      );
  }
  </code></pre>