FormsAuthenticationConfiguration.DefaultUrl Propriedade

Definição

Obtém ou define a URL padrão.Gets or sets the default URL.

public:
 property System::String ^ DefaultUrl { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("defaultUrl", DefaultValue=Mono.Cecil.CustomAttributeArgument)]
[System.Configuration.StringValidator(MinLength=1)]
public string DefaultUrl { get; set; }
[<System.Configuration.ConfigurationProperty("defaultUrl", DefaultValue=Mono.Cecil.CustomAttributeArgument)>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.DefaultUrl : string with get, set
Public Property DefaultUrl As String

Valor da propriedade

String

A URL para a qual redirecionar a solicitação após a autenticação.The URL to which to redirect the request after authentication. O valor padrão é default. aspx.The default value is default.aspx.

Atributos

Exemplos

O exemplo de código a seguir mostra como acessar o DefaultUrl .The following code example shows how to access the DefaultUrl. Consulte o exemplo de código no FormsAuthenticationConfiguration tópico de classe para saber como obter a seção.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"

Comentários

O DefaultUrl será usado se o usuário acessar a página de logon diretamente ou se uma URL de retorno não for fornecida.The DefaultUrl is used if the user accesses the login page directly or if a return URL is not provided.

Aplica-se a