OutputCacheProfile.VaryByCustom Vlastnost

Definice

Získá nebo nastaví VaryByCustom vlastnost.

public:
 property System::String ^ VaryByCustom { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("varyByCustom")]
public string VaryByCustom { get; set; }
[<System.Configuration.ConfigurationProperty("varyByCustom")>]
member this.VaryByCustom : string with get, set
Public Property VaryByCustom As String

Hodnota vlastnosti

String

Hodnota VaryByCustom.

Atributy

Příklady

Následující příklad kódu ukazuje, jak použít VaryByCustom vlastnost.


// Get the current VaryByCustom.
String varyByCustomValue = 
    outputCacheProfile.VaryByCustom;

// Set the VaryByCustom.
outputCacheProfile.VaryByCustom = 
    string.Empty;
  ' Get the current VaryByCustom.
  Dim varyByCustomValue As String = _
  outputCacheProfile.VaryByCustom

  ' Set the VaryByCustom property.
  outputCacheProfile.VaryByCustom = _
  String.Empty

Poznámky

Může VaryByCustom to být libovolný text, který představuje vlastní požadavky na ukládání do mezipaměti výstupu. Pokud je zadán vlastní řetězec, je nutné přepsat metodu GetVaryByCustomString v souboru Global.asax aplikace.

Poznámka

Nastavení VaryByCustom jsou stejná VaryByCustom jako u atributu direktivy @ OutputCache .

Platí pro

Viz také