FormsAuthentication::RedirectToLoginPage Method
.NET Framework (current version)
Redirects the browser to the login URL.
Assembly: System.Web (in System.Web.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | RedirectToLoginPage() | Redirects the browser to the login URL. |
![]() ![]() | RedirectToLoginPage(String^) | Redirects the browser to the login URL with the specified query string. |
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.
Unlike the HttpResponse::Redirect method, this method does not end the request by calling HttpResponse::End. This means that code that follows the RedirectToLoginPage method call will run.
Show:

