Export (0) Print
Expand All

FormsAuthentication::RedirectToLoginPage Method (String)

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

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

public:
static void RedirectToLoginPage(
	String^ extraQueryString
)

Parameters

extraQueryString
Type: System::String
The query string to include with the redirect URL.

The RedirectToLoginPage method redirects the browser to the LoginUrl and includes the extraQueryString value as the QueryString for the redirected URL.

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

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft