title: ASP.NET MVC images and other static content url
body: <p>I just edited my route for a user details page to look like this:</p>
  
  <pre><code>        routes.MapRoute(
              "UserDetails", // Route name
              "{controller}/{action}/{id}/{title}", // URL with parameters
              new { controller = "Users", action = "Details", id = UrlParameter.Optional, title = UrlParameter.Optional } // Parameter defaults
              );
  </code></pre>
  
  <p>Now when my url looks like this: <code>localhost/Users/Details/1/ShawnMclean</code>
  Images do not load both from the controller and the site.master. (no idea why the css and javascript had correct urls though). If the url is <code>localhost/Users/Details/1</code> then everything loads fine.</p>
  
  <p>My img in <code>site.master</code> and <code>Details.aspx</code> looks like this in the old url:</p>
  
  <pre><code>&lt;img src="../../Content/Images/logo3.png" /&gt;
  </code></pre>
  
  <p>but when the url gets an additional parameter, the image is actually located at <code>../../../Content/Images/logo3.png</code></p>
  
  <p>Is there a way to make images and other static content's url change?</p>