OutputCacheProfile.VaryByCustom Własność
Definicja
Ważny
Niektóre informacje dotyczą produktów przedpremierowych, które mogą zostać znacznie zmodyfikowane przed premierą. Microsoft nie udziela żadnych gwarancji, ani wyraźnych, ani domniemanych, dotyczących informacji podanych tutaj.
Pobiera lub ustawia VaryByCustom właściwość.
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
Wartość nieruchomości
Wartość wyliczenia VaryByCustom.
- Atrybuty
Przykłady
W poniższym przykładzie kodu pokazano, jak używać VaryByCustom właściwości.
// 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
Uwagi
Może VaryByCustom to być dowolny tekst reprezentujący niestandardowe wymagania dotyczące buforowania danych wyjściowych. W przypadku wprowadzenia ciągu niestandardowego należy zastąpić GetVaryByCustomString metodę w pliku Global.asax aplikacji.
Uwaga
Ustawienia VaryByCustom są takie same, które są używane przez VaryByCustom atrybut @ OutputCache dyrektywy.