Bagikan melalui


ProfileSection.AutomaticSaveEnabled Properti

Definisi

Mendapatkan atau menetapkan nilai yang menentukan apakah perubahan pada informasi profil pengguna secara otomatis disimpan pada keluar halaman.

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

Nilai Properti

true jika informasi profil secara otomatis disimpan pada halaman keluar; jika tidak, false. Default adalah true.

Atribut

Contoh

Contoh kode berikut menunjukkan cara menggunakan AutomaticSaveEnabled properti . Contoh kode ini adalah bagian dari contoh yang lebih besar yang disediakan untuk ProfileSection kelas .


// 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

Keterangan

AutomaticSaveEnabled Ketika properti adalah false, perubahan pada profil individual tidak disimpan kecuali Save metode ProfileCommon kelas dipanggil dalam kode. AutomaticSaveEnabled Ketika properti adalah true, peristiwa juga ProfileAutoSaving memungkinkan kode untuk mengambil alih perilaku penyimpanan otomatis.

Berlaku untuk

Lihat juga