Web.Admin/Views/Shared/_LoginPartial.cshtml
@if (Request.IsAuthenticated)
{
@*@Html.ActionLink(User.Identity.Name, "Manage", "Account", routeValues: null, htmlAttributes: new { @class = "username", title = "Manage" })!*@
<li>
@using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-form navbar-left" }))
{
@Html.AntiForgeryToken()
<input type="submit" id="logoff" class="btn btn-default" value="Log off @User.Identity.Name" />
}
</li>
}
else
{
<li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
<li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
}