PartialCachingAttribute.VaryByCustom Eigenschap

Definitie

Hiermee haalt u een lijst op met aangepaste tekenreeksen die door de uitvoercache worden gebruikt om het gebruikersbeheer te variëren.

public:
 property System::String ^ VaryByCustom { System::String ^ get(); };
public:
 property System::String ^ VaryByCustom { System::String ^ get(); void set(System::String ^ value); };
public string VaryByCustom { get; }
public string VaryByCustom { get; set; }
member this.VaryByCustom : string
member this.VaryByCustom : string with get, set
Public ReadOnly Property VaryByCustom As String
Public Property VaryByCustom As String

Waarde van eigenschap

De lijst met aangepaste tekenreeksen.

Voorbeelden

In het volgende codevoorbeeld ziet u hoe de PartialCachingAttribute(Int32, String, String, String) constructor kan worden toegepast op een gebruikersbeheer. In het voorbeeld wordt de constructor gebruikt om aan te geven dat het gebruikersbesturingselement in de cache kan worden opgeslagen en om op te geven dat de cachevermelding afhankelijk is van het browsertype en het primaire versienummer.

// Set the PartialCachingAttribute.Duration property to
// 20 seconds and the PartialCachingAttribute.VaryByCustom
// property to browser.
[PartialCaching(20, null, null, "browser")]
public partial class ctlSelect : UserControl
' Set the PartialCachingAttribute.Duration property to
' 20 seconds and the PartialCachingAttribute.VaryByCustom
' property to browser.
<PartialCaching(20, Nothing, Nothing, "browser")> _
Public Class ctlSelect
    Inherits UserControl

Opmerkingen

Als u 'browser' opgeeft voor deze eigenschap, wordt het gebruikersbesturingselement gevarieerd per browsertype en hoofdversienummer. U kunt deze eigenschap ook gebruiken om de waarden die de uitvoercache uitvoert, uit te breiden, verschilt het antwoord van het gebruikersbesturingselement.

Van toepassing op