FormsAuthentication::RedirectToLoginPage Method ()

 

Redirects the browser to the login URL.

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

public:
static void RedirectToLoginPage()

The RedirectToLoginPage method redirects the browser to the LoginUrl.

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

The following code example clears the forms-authentication cookie using the SignOut method and redirects the user to the login page using the RedirectToLoginPage method.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: