System.Web.Security.FormsAuthentication.RedirectToLoginPage Method

Redirects the browser to the login URL.

Syntax

public static void RedirectToLoginPage ()

Remarks

The FormsAuthentication.RedirectToLoginPage method redirects the browser to the FormsAuthentication.LoginUrl.

The FormsAuthentication.RedirectToLoginPage method does not clear the forms-authentication cookie. You can use the FormsAuthentication.RedirectToLoginPage method in conjunction with the FormsAuthentication.SignOut method to log one user out and allow a different user to log in.

Requirements

Namespace: System.Web.Security
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0