ASP.NET MVC Areas with shared layout
问题 I have defined an area (Admin) in my ASP.NET MVC 3 application, created _ViewStart.cshtml in that area and added Layout = "~/Views/Shared/_Layout.cshtml"; to it to have a unified site layout. I also added the following code to _Layout.cshtml : if (HttpContext.Current.User.IsInRole("Admin")) { <li>@Html.ActionLink("Items List", "Index", "Items", new { area = "Admin" }, null)</li> } The Admin area is displayed properly having _Layout.cshtml as its layout. But all the navigation links in the