OutputCacheProfile.VaryByCustom Propriedade

Definição

Obtém ou definem a VaryByCustom propriedade.

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 Propriedade

O valor VaryByCustom.

Atributos

Exemplos

O seguinte exemplo de código mostra como usar a VaryByCustom propriedade.


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

Observações

Pode VaryByCustom ser qualquer texto que represente requisitos personalizados de cache de saída. Se uma string personalizada for inserida, deve sobrescrever o GetVaryByCustomString método no ficheiro Global.asax da aplicação.

Note

As VaryByCustom definições são as mesmas usadas pelo VaryByCustom atributo da @ OutputCache diretiva.

Aplica-se a

Ver também