ProfileSection.AutomaticSaveEnabled Propriedade

Definição

Recebe ou define um valor que determina se alterações à informação do perfil do utilizador são automaticamente guardadas ao sair da página.

public:
 property bool AutomaticSaveEnabled { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("automaticSaveEnabled", DefaultValue=true)]
public bool AutomaticSaveEnabled { get; set; }
[<System.Configuration.ConfigurationProperty("automaticSaveEnabled", DefaultValue=true)>]
member this.AutomaticSaveEnabled : bool with get, set
Public Property AutomaticSaveEnabled As Boolean

Valor de Propriedade

true se a informação do perfil for guardada automaticamente na saída da página; caso contrário, false. A predefinição é true.

Atributos

Exemplos

O seguinte exemplo de código mostra como usar a AutomaticSaveEnabled propriedade. Este exemplo de código faz parte de um exemplo maior fornecido para a ProfileSection classe.


// Get the current AutomaticSaveEnabled property value.
Console.WriteLine(
    "Current AutomaticSaveEnabled value: '{0}'", profileSection.AutomaticSaveEnabled);

// Set the AutomaticSaveEnabled property to false.
profileSection.AutomaticSaveEnabled = false;

' Get the current AutomaticSaveEnabled property value.
Console.WriteLine( _
    "Current AutomaticSaveEnabled value: '{0}'", profileSection.AutomaticSaveEnabled)

' Set the AutomaticSaveEnabled property to false.
profileSection.AutomaticSaveEnabled = false

Observações

Quando a AutomaticSaveEnabled propriedade é false, alterações a perfis individuais não são guardadas a menos que o Save método da ProfileCommon classe seja chamado em código. Quando a AutomaticSaveEnabled propriedade é true, o ProfileAutoSaving evento também permite que o código substitua o comportamento de gravação automática.

Aplica-se a

Ver também