OutputCacheProfile.VaryByCustom Vlastnost
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
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
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í výstupu do mezipaměti. Pokud je zadán vlastní řetězec, musíte přepsat GetVaryByCustomString metodu v souboru Global.asax aplikace.
Poznámka:
Nastavení VaryByCustom jsou stejná VaryByCustom jako u atributu direktivy @ OutputCache .