Bagikan melalui


OutputCacheProfile.NoStore Properti

Definisi

Mendapatkan atau menetapkan nilai yang menunjukkan apakah penyimpanan sekunder diaktifkan.

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

Nilai Properti

true jika penyimpanan sekunder diaktifkan; jika tidak, false. Nilai defaultnya adalah false.

Atribut

Contoh

Contoh kode berikut menunjukkan cara menggunakan NoStore properti .


// Get the current NoStore.
Boolean noStoreValue = 
    outputCacheProfile.NoStore;

// Set the NoStore.
outputCacheProfile.NoStore = false;
  ' Get the current NoStore.
  Dim noStoreValue As [Boolean] = _
  outputCacheProfile.NoStore

  ' Set the NoStore property.
outputCacheProfile.NoStore = False

Keterangan

Halaman yang memiliki properti diatur OutputCacheProfile.NoStore untuk true mengeluarkan respons yang ditentukan di headernya untuk mencegah penyimpanan sekunder informasi sensitif.

Mengatur atribut ini ke true setara dengan memanggil HttpCachePolicy.SetNoStore metode selama permintaan Web.

Berlaku untuk

Lihat juga