title: Url.Action(action,controller,routeValues) doubling up ID in URL
body: <p>I am using the following code (taken from a Stackoverflow post: <a href="https://stackoverflow.com/questions/4896439/action-image-mvc3-razor">Action Image MVC3 Razor</a> ) in an HTML extension helper to build an action link.  My Url.Action() method is returning a url that has the routeValues both in the route as well as appended onto the url like so:</p>
  
  <pre><code>/Proposals/List/Tabled?id=Tabled
  </code></pre>
  
  <p>when what I want is just</p>
  
  <pre><code>/Proposals/List?id=Tabled
  </code></pre>
  
  <p>Any suggestions about why it wants to do this?</p>
  
  <p><strong>Update</strong>:</p>
  
  <p>A route rule from my <code>Global.asax</code> file.  That must be why it's doing it, but why it's getting doubled up is still a mystery to me.</p>
  
  <pre><code>routes.MapRoute( _
      "ProposalsList", _
      "Proposals/List/{status}", _
      New With {.controller = "Proposals", .action = "List", .status = "Pending"} _
      )
  </code></pre>
  
  <p><strong>Update</strong>:</p>
  
  <p>Here is my call to the method, and I added the method definition to the code below.</p>
  
  <pre><code>@Html.ActionImage("Proposals", "List", New With {.id = Model.StatusFilter}, "~/images/" + Model.ImageFile, "Count", 32, 32, Model.ProposalsCount.ToString + " " + Model.StatusFilter + " Proposal(s)")
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>    &lt;Extension()&gt; _
      Public Function ActionImage(ByVal html As HtmlHelper, ByVal controller As String, ByVal action As String, ByVal routeValues As Object, ByVal imagePath As String, ByVal alt As String, ByVal width As Integer, ByVal height As Integer, ByVal text As String) As MvcHtmlString                
              Dim url = New UrlHelper(html.ViewContext.RequestContext)
              Dim imgHtml As String
              Dim anchorHtml As String
              Dim imgbuilder = New TagBuilder("img")
  
              imgbuilder.MergeAttribute("src", url.Content(imagePath))
              imgbuilder.MergeAttribute("alt", alt)
              imgbuilder.MergeAttribute("width", width)
              imgbuilder.MergeAttribute("height", height)
              imgHtml = imgbuilder.ToString(TagRenderMode.SelfClosing)
  
              Dim anchorBuilder = New TagBuilder("a")
              anchorBuilder.MergeAttribute("href", url.Action(action, controller, routeValues))
              anchorBuilder.InnerHtml = imgHtml + "&lt;br/&gt;" + text
              anchorHtml = anchorBuilder.ToString(TagRenderMode.Normal)
  
              Return MvcHtmlString.Create(anchorHtml)
      End Function
  </code></pre>