PartialCachingAttribute.VaryByParams Właściwość

Definicja

Pobiera listę parametrów ciągu zapytania lub formularza POST , których będzie używać pamięć podręczna danych wyjściowych, aby zmienić kontrolkę użytkownika.

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

Wartość właściwości

String

Lista parametrów ciągu zapytania lub formularza POST .

Przykłady

W poniższym przykładzie kodu pokazano, jak PartialCachingAttribute(Int32, String, String, String) konstruktor można zastosować do kontrolki użytkownika. W tym przykładzie konstruktor służy do wskazywania, że kontrolka użytkownika może być buforowana i określać parametr, na którym zależy wpis pamięci podręcznej.

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

Dotyczy