FormsAuthenticationConfiguration.DefaultUrl Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the default URL.
public:
property System::String ^ DefaultUrl { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("defaultUrl", DefaultValue="default.aspx")]
[System.Configuration.StringValidator(MinLength=1)]
public string DefaultUrl { get; set; }
[<System.Configuration.ConfigurationProperty("defaultUrl", DefaultValue="default.aspx")>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.DefaultUrl : string with get, set
Public Property DefaultUrl As String
Property Value
The URL to which to redirect the request after authentication. The default value is default.aspx.
- Attributes
Examples
The following code example shows how to access the DefaultUrl. Refer to the code example in the FormsAuthenticationConfiguration class topic to learn how to get the section.
// Get current DefaultUrl.
string currentDefaultUrl =
formsAuthentication.DefaultUrl;
// Set current DefaultUrl.
formsAuthentication.DefaultUrl = "newDefaultUrl";
' Get current DefaultUrl.
Dim currentDefaultUrl As String =
formsAuthentication.DefaultUrl
' Set current DefaultUrl.
formsAuthentication.DefaultUrl = "newDefaultUrl"
Remarks
The DefaultUrl is used if the user accesses the login page directly or if a return URL is not provided.