OutputCacheProfile.VaryByCustom Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan atau mengatur VaryByCustom properti .
public:
property System::String ^ VaryByCustom { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("varyByCustom")]
public string VaryByCustom { get; set; }
[<System.Configuration.ConfigurationProperty("varyByCustom")>]
member this.VaryByCustom : string with get, set
Public Property VaryByCustom As String
Nilai Properti
Nilainya VaryByCustom .
- Atribut
Contoh
Contoh kode berikut menunjukkan cara menggunakan VaryByCustom properti .
// Get the current VaryByCustom.
String varyByCustomValue =
outputCacheProfile.VaryByCustom;
// Set the VaryByCustom.
outputCacheProfile.VaryByCustom =
string.Empty;
' Get the current VaryByCustom.
Dim varyByCustomValue As String = _
outputCacheProfile.VaryByCustom
' Set the VaryByCustom property.
outputCacheProfile.VaryByCustom = _
String.Empty
Keterangan
VaryByCustom dapat berupa teks apa pun yang mewakili persyaratan penembolokan output kustom. Jika string kustom dimasukkan, Anda harus mengambil GetVaryByCustomString alih metode dalam file Global.asax aplikasi.
Catatan
Pengaturan VaryByCustom adalah pengaturan yang sama yang digunakan oleh VaryByCustom atribut @ OutputCache direktif.