title: ASP.NET MVC Areas with shared layout
body: <p>I have defined an area (Admin) in my ASP.NET MVC 3 application, created <code>_ViewStart.cshtml</code> in that area and added<code>Layout = "~/Views/Shared/_Layout.cshtml";</code> to it to have a unified site layout.  </p>
  
  <p>I also added the following code to <code>_Layout.cshtml</code>:  </p>
  
  <pre><code>if (HttpContext.Current.User.IsInRole("Admin"))
  {
      &lt;li&gt;@Html.ActionLink("Items List", "Index", "Items", new { area = "Admin" }, null)&lt;/li&gt;
  }
  </code></pre>
  
  <p>The <code>Admin</code> area is displayed properly having <code>_Layout.cshtml</code> as its layout. But all the navigation links in the page now point to <code>Admin</code> subfolder.  </p>
  
  <p>For example in my layout I have <code>&lt;li&gt;@Html.ActionLink("About Us", "About", "Home")&lt;/li&gt;</code>,  which points to <code>Mysite/Home/About</code>. But after clicking the admin link, the "About Us" link points to <code>/Admin/Home/About</code>.  </p>
  
  <p>What should I do to have _Layout.cshtml links pointing to the right address?<br>
  Thanks.</p>