Sdílet prostřednictvím


PartialCachingAttribute.VaryByParams Vlastnost

Definice

Získá seznam parametrů řetězce dotazu nebo formuláře POST , které výstupní mezipaměť bude používat k různým uživatelským ovládacím prvkům.

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

Hodnota vlastnosti

String

Seznam parametrů řetězce dotazu nebo formuláře POST

Příklady

Následující příklad kódu ukazuje, jak PartialCachingAttribute(Int32, String, String, String) lze konstruktor použít pro uživatelský ovládací prvek. V příkladu se konstruktor používá k označení, že uživatelský ovládací prvek lze uložit do mezipaměti a určit parametr, na kterém je položka mezipaměti závislá.

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

Platí pro