is there some way to share a partial razor view between areas?
For example a login partial, it is found if i use @Html.Partial("_LoginPartial")
but the URLs Html.ActionLink
generates are local to the calling area (even though the partial itself is not part of the area).
_LoginPartial.cshtml is in /Views/Shared/_LoginPartial.cshtml
Calling view is inside /Areas/Somearea/Views
Links generated are like: http://example.com/Somearea/Account/Login
But should always be: http://example.com/Account/Login
Partial view source:
@if(Request.IsAuthenticated) {
<text>Welcome <b>@Context.User.Identity.Name</b>!
[ @Html.ActionLink(@Messages.Logout, "Logout", "Account") ]</text>
}
else {
@:[ @Html.ActionLink(@Messages.Login, "Login", "Account") ]
}
Thanks