title: ASP.NET MVC passing an ID in an ActionLink to the controller
body: <p>I can't seem to retrieve an ID I'm sending in a html.ActionLink in my controller, here is what I'm trying to do</p>
  <pre><code>&lt;li&gt;
      &lt;%= Html.ActionLink(&quot;Modify Villa&quot;, &quot;Modify&quot;, &quot;Villa&quot;, new { @id = &quot;1&quot; })%&gt;&lt;/li&gt;
  
  
      public ActionResult Modify(string ID)
      {
  
          ViewData[&quot;Title&quot;] =ID;
          return View();
      }
  </code></pre>
  <p>That's what a tutorial I followed recommended, but it's not working, it's also putting ?Length=5 at the end of the URL!</p>
  <p>Here is the route I'm using, it's default</p>
  <pre><code>        routes.MapRoute(
              &quot;Default&quot;,                                              // Route name
              &quot;{controller}/{action}/{id}&quot;,                           // URL with parameters
              new { controller = &quot;Home&quot;, action = &quot;Index&quot;, id = &quot;&quot; }  // Parameter defaults
          );
  </code></pre>