ProfileManager.AutomaticSaveEnabled Propriedade
Definição
Obtém um valor que indica se o perfil do usuário será automaticamente salvo no final da execução de uma página ASP.NET.Gets a value indicating whether the user profile will be automatically saved at the end of the execution of an ASP.NET page.
public:
static property bool AutomaticSaveEnabled { bool get(); };
public static bool AutomaticSaveEnabled { get; }
member this.AutomaticSaveEnabled : bool
Public Shared ReadOnly Property AutomaticSaveEnabled As Boolean
Valor da propriedade
trueSe o perfil do usuário for salvo automaticamente no final da execução de uma página do ASP.NET; caso contrário, false .true if the user profile will be automatically saved at the end of the execution of an ASP.NET page; otherwise, false. O padrão é true.The default is true.
Exceções
Foi feita uma tentativa de obter o valor da propriedade AutomaticSaveEnabled sem pelo menos a permissão Medium.An attempt was made to get the AutomaticSaveEnabled property value without at least Medium permission.
Exemplos
O trecho de arquivo de configuração a seguir mostra o elemento Profile na seção System. web do arquivo Web.config para um aplicativo ASP.net.The following configuration file excerpt shows the profile element in the system.web section of the Web.config file for an ASP.NET application. Ele especifica o provedor de perfil padrão do aplicativo para uma SqlProfileProvider instância e define o automaticSaveEnabled atributo como true .It specifies the application's default profile provider to a SqlProfileProvider instance and sets the automaticSaveEnabled attribute to true.
<profile enabled="true"
automaticSaveEnabled="true"
defaultProvider="SqlProvider">
<providers>
<add name="SqlProvider"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="SqlServices"
applicationName="MyApplication" />
</providers>
</profile>
Comentários
A AutomaticSaveEnabled propriedade indica se a gravação automática do perfil do usuário está habilitada para o aplicativo.The AutomaticSaveEnabled property indicates whether automatic saving of the user profile is enabled for the application. Se a gravação automática estiver habilitada, o ProfileModule objeto gerará o ProfileAutoSaving evento e chamará o Save método durante o EndRequest evento no final da execução de uma página ASP.net.If automatic saving is enabled, the ProfileModule object raises the ProfileAutoSaving event and calls the Save method during the EndRequest event at the end of the execution of an ASP.NET page.
A AutomaticSaveEnabled propriedade é definida usando o automaticSaveEnabled atributo do elemento profile no arquivo Web.config para um aplicativo ASP.net.The AutomaticSaveEnabled property is set using the automaticSaveEnabled attribute of the profile element in the Web.config file for an ASP.NET application.