title: ActionLink with routeValues creates old-skool style URL
body: <p>I have a route defined as such:</p>
  
  <pre><code>    routes.MapRoute(
          "CustomerWithScreenName", // Route name
          "Customer/{sn}/{action}", // e.g. Customer/KingKong89/Schedule
          new { controller = "Customer", action = "Signup", id = "" } // Parameter defaults
      );
  </code></pre>
  
  <p>But when I formulate a link using ActionLink like this:</p>
  
  <pre><code>&lt;%: Html.ActionLink("Click here", "Schedule", "Customer", new { sn = "KingKong89", new { @class="topLink" } )%&gt;
  </code></pre>
  
  <p>The resulting hyperlink/URL comes out like this:</p>
  
  <p><a href="http://localhost:65071/Customer/Schedule?sn=KingKong89" rel="nofollow noreferrer">http://localhost:65071/Customer/Schedule?sn=KingKong89</a></p>
  
  <p>It works but I expected ActionLink to use the known routes and construct the correct link which would be:</p>
  
  <p><a href="http://localhost:65071/Customer/KingKong89/Schedule" rel="nofollow noreferrer">http://localhost:65071/Customer/KingKong89/Schedule</a></p>
  
  <p>Is my expectation wrong? Is it the parametered URL how it should work?</p>
  
  <p>Note: I don't specify {controller} in the route. I can't seem to mix this route with the more orthodox {controller}{action}{id} route - maybe I should stop trying to be clever and adopt the convention.</p>
  
  <p>Thanks for your help. Luke.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I have a theory that without a proper route (including the {controller} special keyword), I won't be able to make ActionLink produce proper URLs.</p>
  
  <p>So I'm now turning my sights on why this simple route doesn't work:</p>
  
  <pre><code>routes.MapRoute(
          "ControllerWithScreenName", // Route name
          "{controller}/{sn}/{action}", // e.g. Customer/Dave/Schedule
          new { controller = "Customer", action = "Signup", sn = "" } // Parameter defaults
          );
  </code></pre>
  
  <p>As the only route, along with the default "Root", it doesn't play ball. If the controller name is added specifically (as in the first snippet above) it does.</p>
  
  <p><strong>UPDATE 2</strong></p>
  
  <p>Due to time constraints, I'm giving up on my param-before-action style URL and going back to the default controller\action\param - its a small thing in the grand scheme of making progress and not feeling frustrated and depressed.</p>
  
  <p><strong>UPDATE 3</strong></p>
  
  <p>I'm going to uncomment all my smart-ass routes and try using a RouteLink and specify the type of route to use. I think this is the raison d'etre of the RouteLink comment.</p>
  
  <p><strong>UPDATE 4</strong></p>
  
  <p>This is no good. This requires the app has knowledge of the routes to take which means I lose the option to just alter the routing in future and have all the links update automatically.</p>