title: ASP.NET MVC 3 Routes Always Have Querystring Value "Area="
body: <p>This is an annoyance that I've experienced for a long time, but now my client is asking me to address it.</p>
  
  <p>In every route that gets generated (by a non-Default route), a query string value gets appended: "<code>Area=</code>"</p>
  
  <p>As an example:</p>
  
  <pre><code>// RouteConfig.Register():
  routes.MapRoute(
      "ProfileDetails",
      "{slug}",
      new { controller = "Profile", action = "Details" }
  );
  
  routes.MapRoute(
      "Default",
      "{controller}/{action}/{id}",
      new { controller = "Home", action = "Index", id = UrlParameter.Optional } 
  );
  </code></pre>
  
  <p>To generate a URL to the <code>BadgeController.Index</code> action, the Default route will be applied and the result will be <code>/Badge</code>... and that's what is expected.</p>
  
  <p>But to generate a URL to the <code>ProfileController.Details(someUser)</code> action, the ProfileDetails route will be applied and the result will be <code>/someUser?Area=</code> ... which will work, but the <code>?Area=</code> is unnecessary and messy.</p>
  
  <p>I have no areas in my project. How do I get rid of that <code>Area=</code> query string value? This happens with all of my routes that are not the predefined Default route, not just the "ProfileDetails" one in this example.</p>
  
  <p>I've tried removing the <code>AreaRegistration.RegisterAllAreas()</code> from my Global.asax file, since I assume it's not required.</p>