PageRenderTime 3ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/AnotherStartup/Account/Logout.cshtml

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