LogOut.cshtml 584 B

123456789101112131415161718192021
  1. @page
  2. @model LogoutModel
  3. @{
  4. ViewData["Title"] = "Log out";
  5. }
  6. <header>
  7. <h1>@ViewData["Title"]</h1>
  8. @{
  9. if (User.Identity.IsAuthenticated)
  10. {
  11. <form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@Url.Page("/", new { area = "" })" method="post">
  12. <button type="submit" class="nav-link btn btn-link text-dark">Click here to Logout</button>
  13. </form>
  14. }
  15. else
  16. {
  17. <p>You have successfully logged out of the application.</p>
  18. }
  19. }
  20. </header>