title: URL.Action includes id when constructing URL
body: <p>I'm using ASP.Net MVC.  Here's my code snippets from a controller named Course:</p>
  
  <pre><code>public ActionResult List(int id)
  {
      var viewmodel.ShowUrl = Url.Action("Show", "Course");
  
  
      ...
  }
  
  public ActionResult Show(int id)
  {
    ...
  }
  </code></pre>
  
  <p>viewmodel.ShowUrl picks up whatever the value is of the "id" parameter.  So viewmodel.ShowUrl becomes "/Course/Show/151" (value of id is 151);  I want to be able to set the id part on the client based on user interaction.  I want the value of viewmodel.ShowUrl to be "/Course/Show".  </p>
  
  <p>This seems like a bug to me.  I'm not telling Url.Action to include an id value.  It's doing it on its own.  If I want to set the id value then I would do something like this:</p>
  
  <pre><code>var viewmodel.ShowUrl = Url.Action("Show", "Course", new {id = somevalue});
  </code></pre>
  
  <p>So, how do you prevent MVC from adding the id value?  I can hardcode viewmodel.ShowUrl to "/Course/Show" but that seems to be a kludgy solution.  Thanks.</p>