Compartir vía


OutputCacheProfile.VaryByCustom Propiedad

Definición

Obtiene o establece la VaryByCustom propiedad .

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

Valor de propiedad

Valor de tipo VaryByCustom.

Atributos

Ejemplos

En el ejemplo de código siguiente se muestra cómo usar la VaryByCustom propiedad .


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

Comentarios

VaryByCustom puede ser cualquier texto que represente los requisitos personalizados de almacenamiento en caché de salida. Si se escribe una cadena personalizada, debe invalidar el GetVaryByCustomString método en el archivo Global.asax de la aplicación.

Nota:

La VaryByCustom configuración es la misma que usa el VaryByCustom atributo de la @ OutputCache directiva .

Se aplica a

Consulte también