title: MVC Routing not giving desired route
body: <p>I have the following code in my RouteConfig.cs file:</p>
  
  <pre><code>public static void RegisterRoutes(RouteCollection routes)
  {
      routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  
      routes.MapRoute(
          name: "Location",
          url: "Order/Location",
          defaults: new { controller = "Order", action = "Location" }
      );
  
      routes.MapRoute(
          name: "Step3",
          url: "Order/{location}/{category}/{item}/{id}/{orderId}",
          defaults: new { controller = "Order", action = "Step3", orderId = UrlParameter.Optional }
      );
  
      routes.MapRoute(
          name: "Step2",
          url: "Order/{location}/{category}/{orderId}",
          defaults: new { controller = "Order", action = "Step2", orderId = UrlParameter.Optional }
      );
  
      routes.MapRoute(
          name: "Step1",
          url: "Order/{location}/{orderId}",
          defaults: new { controller = "Order", action = "Step1", orderId = UrlParameter.Optional }
      );
  
      routes.MapRoute(
          name: "Default",
          url: "{controller}/{action}/{id}",
          defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
      );
  }
  </code></pre>
  
  <p>Here is what I'm trying to achieve:</p>
  
  <pre><code>-----------------------------------------------------------------------
  | Url                                              | Desired Action   |
  |--------------------------------------------------|------------------|
  | http://localhost/Order/Phoenix                   | Step1            |
  | http://localhost/Order/Phoenix/Parts             | Step2            |
  | http://localhost/Order/Phoenix/Parts/Plugs/12    | Step3            |
  | http://localhost/Order/Phoenix/47                | Step1            |
  | http://localhost/Order/Phoenix/Parts/47          | Step2            |
  | http://localhost/Order/Phoenix/Parts/Plugs/12/47 | Step3            |
  |---------------------------------------------------------------------|
  </code></pre>
  
  <p>The first 3 URLs are working, as expected. The problem is with the last 3. I know what's happening. The MVC route engine is evaluating the routes in the order they were mapped and when it sees <code>http://localhost/Phoenix/47</code>, it is thinking <code>47</code> is a category and its going to <code>Step2</code> before it gets to <code>Step1</code>. I almost need the route engine to be smart enough to know that a number will be an <code>orderId</code>.</p>
  
  <p>How can I re-engineer my route list to get me the desired behavior?</p>