You can create a Forms Authentication logout page by creating a logout button and calling the FormsAuthentication.SignOut() method, as shown here:

C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development: Build applications with C#, .NET Core, Entity Framework Core, ASP.NET Core, and ML.NET using Visual Studio Code, 4th Edition
ASP.NET Core 3 and Angular 9: Full stack web development with .NET Core 3.1 and Angular 9, 3rd Edition
C# in Depth, 4th Edition

protected void SignOutAction_Click(object sender, EventArgs e)





When you call the SignOut() method, you remove the authentication cookie. Depending on the application, you can redirect the user to another page when the user logs out. If the user requests another restricted page, the request will be redirected to the login page. You can also redirect to the login page immediately after calling the SignOut method or you can use the Response.Redirect method.