System.Web.Security.FormsAuthentication.RedirectToLoginPage Method

Redirects the browser to the login URL with the specified query string.

Syntax

public static void RedirectToLoginPage (string extraQueryString)

Parameters

extraQueryString
The query string to include with the redirect URL.

Remarks

The FormsAuthentication.RedirectToLoginPage(string) method redirects the browser to the FormsAuthentication.LoginUrl and includes the extraQueryString value as the System.Management.ManagementQuery.QueryString for the redirected URL.

The FormsAuthentication.RedirectToLoginPage(string) method does not clear the forms-authentication cookie. You can use the FormsAuthentication.RedirectToLoginPage(string) 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