PartialCachingAttribute.VaryByParams Tulajdonság

Definíció

Lekéri azoknak a lekérdezési sztringeknek vagy űrlapparamétereknek POST a listáját, amelyeket a kimeneti gyorsítótár a felhasználói vezérlők eltérő használatára fog használni.

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

Tulajdonság értéke

A lekérdezési sztring vagy űrlapparaméterek POST listája.

Példák

Az alábbi példakód bemutatja, hogyan alkalmazható a PartialCachingAttribute(Int32, String, String, String) konstruktor egy felhasználói vezérlőre. A példában a konstruktor azt jelzi, hogy a felhasználói vezérlő gyorsítótárazható, és megadhatja azt a paramétert, amelytől a gyorsítótár-bejegyzés függ.

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

A következőre érvényes: