PartialCachingAttribute.VaryByParams 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 daftar string kueri atau parameter formulir POST yang akan digunakan cache output untuk memvariasikan kontrol pengguna.
public:
property System::String ^ VaryByParams { System::String ^ get(); };
public:
property System::String ^ VaryByParams { System::String ^ get(); void set(System::String ^ value); };
public string VaryByParams { get; }
public string VaryByParams { get; set; }
member this.VaryByParams : string
member this.VaryByParams : string with get, set
Public ReadOnly Property VaryByParams As String
Public Property VaryByParams As String
Nilai Properti
Daftar string kueri atau parameter formulir POST .
Contoh
Contoh kode berikut menunjukkan bagaimana PartialCachingAttribute(Int32, String, String, String) konstruktor dapat diterapkan ke kontrol pengguna. Dalam contoh, konstruktor digunakan untuk menunjukkan bahwa kontrol pengguna dapat di-cache dan untuk menentukan parameter di mana entri cache bergantung.
// Set the PartialCachingAttribute.Duration property to
// 20 seconds and the PartialCachingAttribute.VaryByParams
// property to ctlSelect.country, the full name of the form
// POST parameter generated by the country DropDownList control.
[PartialCaching(20, "ctlSelect.country", null, null)]
public partial class ctlSelect : UserControl
' Set the PartialCachingAttribute.Duration property to
' 20 seconds and the PartialCachingAttribute.VaryByParams
' property to ctlSelect.country, the full name of the form
' POST parameter generated by the country DropDownList control.
<PartialCaching(20, "ctlSelect.country", Nothing, Nothing)> _
Public Class ctlSelect
Inherits UserControl