title: MVC Attribute routing with Url.Action not resolving route
body: <p>I cannot get <code>@Url.Action</code> to resolve to the url I am expecting based on the attribute route I have applied:</p>
  
  <p><strong>My action (SearchController but with [RoutePrefix("add")])</strong></p>
  
  <pre><code>     [Route("{searchTerm}/page/{page?}", Name = "NamedSearch")]
       [Route("~/add")]
       public ActionResult Index(string searchTerm = "", int page = 1)
       {
         ...
       }
  </code></pre>
  
  <p><strong>Call to Url.Action</strong></p>
  
  <pre><code>@Url.Action("Index", new { controller = "Search", searchTerm = "replaceMe", page = 1 })
  </code></pre>
  
  <p>This results in a url of</p>
  
  <blockquote>
    <p><code>/add?searchTerm=replaceMe&amp;page=1</code></p>
  </blockquote>
  
  <p>I would expect</p>
  
  <blockquote>
    <p><code>/add/replaceMe/page/1</code></p>
  </blockquote>
  
  <p>If I type the url manually then it resolves to the correct action with the correct parameters. Why doesn't <code>@Url.Action</code> resolve the correct url?</p>