/AnotherStartup/Account/Logout.cshtml
# · Razor · 12 lines · 11 code · 1 blank · 0 comment · 2 complexity · dda579405c6c97391a59450dbbcf401e MD5 · raw file
- @{
- // Log out of the current user context
- WebSecurity.Logout();
-
- // Redirect back to the homepage or return URL
- var returnUrl = Request.QueryString["ReturnUrl"];
- if (returnUrl.IsEmpty()) {
- Response.Redirect("~/");
- } else {
- Context.RedirectLocal(returnUrl);
- }
- }