Share via


OutputCacheProfile.VaryByCustom Eigenschaft

Definition

Ruft die VaryByCustom-Eigenschaft ab oder legt diese fest.

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

Eigenschaftswert

String

Der VaryByCustom-Wert.

Attribute

Beispiele

Im folgenden Codebeispiel wird die Verwendung der VaryByCustom-Eigenschaft veranschaulicht.


// 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

Hinweise

Dies kann ein beliebiger Text sein, der VaryByCustom benutzerdefinierte Ausgabecacheanforderungen darstellt. Wenn eine benutzerdefinierte Zeichenfolge eingegeben wird, müssen Sie die GetVaryByCustomString Methode in der Datei "Global.asax" der Anwendung außer Kraft setzen.

Hinweis

Die VaryByCustom Einstellungen sind dieselben, die vom VaryByCustom Attribut der @ OutputCache Direktive verwendet werden.

Gilt für

Siehe auch