PartialCachingAttribute.VaryByParams Propriedade
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Obtém uma lista de parâmetros de string de consulta ou formulário POST que a cache de saída usará para variar o controlo do utilizador.
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
Valor de Propriedade
A lista de parâmetros de string de consulta ou formulário POST .
Exemplos
O exemplo de código seguinte demonstra como o PartialCachingAttribute(Int32, String, String, String) construtor pode ser aplicado a um controlo de utilizador. No exemplo, o construtor é usado para indicar que o controlo do utilizador pode ser armazenado em cache e para especificar o parâmetro do qual a entrada da cache depende.
// 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