Guest User

Untitled

a guest
Jun 23rd, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. @using Microsoft.AspNetCore.Identity
  2. @using MTO.Models
  3.  
  4. @inject SignInManager<ApplicationUser> SignInManager
  5. @inject UserManager<ApplicationUser> UserManager
  6.  
  7. @if (SignInManager.IsSignedIn(User))
  8. {
  9. <form asp-area="" asp-controller="Account" asp-action="Logout" method="post" id="logoutForm" class="navbar-right">
  10. <ul class="nav navbar-nav navbar-right">
  11. <li>
  12. <a asp-area="" asp-controller="Manage" asp-action="Index" title="Manage">Hello @UserManager.GetUserName(User)!</a>
  13. </li>
  14. <li>
  15. <button type="submit" class="btn btn-link navbar-btn navbar-link">Log out</button>
  16. </li>
  17. </ul>
  18. </form>
  19. }
  20. else
  21. {
  22. <ul class="nav navbar-nav navbar-right">
  23. <li style="margin-top:9px"><a class="btn btn-primary btn-block navbar-header" style="color:white; line-height: 10px; border-radius: 0;font-size:15px; font-family:'Open Sans'" asp-page="/TourAnbieten">Tour anbieten</a></li>
  24. <li style="margin-top:5px;font-size:15px; font-family:'Open Sans'"><a asp-area="" asp-controller="Registrieren" asp-action="Create" style="color:#2e5064">Anmelden</a></li>
  25. <li style="margin-top:5px;font-size:15px; font-family:'Open Sans'"><a asp-area="" asp-controller="Login" asp-action="Details" style="color:#2e5064">Einloggen</a></li>
  26.  
  27. @*<li><a asp-area="" asp-controller="Account" asp-action="Register">Register</a></li>
  28. <li><a asp-area="" asp-controller="Account" asp-action="Login">Log in</a></li>*@
  29. </ul>
  30. }
  31.  
  32. if(condition == true)
  33. {
  34. //show logged in partial
  35.  
  36. }
Add Comment
Please, Sign In to add comment