Export (0) Print
Expand All
1 out of 5 rated this helpful - Rate this topic

FormsAuthentication.LoginUrl Property

Gets the URL for the login page that the FormsAuthentication class will redirect to.

Namespace: System.Web.Security
Assembly: System.Web (in system.web.dll)
public static string LoginUrl { get; }
/** @property */
public static String get_LoginUrl ()

public static function get LoginUrl () : String

Not applicable.

Property Value

The URL for the login page that the FormsAuthentication class will redirect to. The default is "login.aspx."

The LoginUrl property value is set in the configuration file for an ASP.NET application by using the loginUrl attribute of the forms configuration element. The LoginUrl is used by the RedirectToLoginPage method.

The following code example sets the loginUrl attribute in the Web.config file.

<authentication mode="Forms">
  <forms loginUrl="member_login.aspx"
    defaultUrl="index.aspx" />
</authentication>

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.