Partage via


OutputCacheProfile.VaryByCustom Propriété

Définition

Obtient ou définit la VaryByCustom propriété.

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

Valeur de propriété

valeur VaryByCustom.

Attributs

Exemples

L’exemple de code suivant montre comment utiliser la VaryByCustom propriété.


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

Remarques

Il VaryByCustom peut s’agir de n’importe quel texte qui représente les exigences de mise en cache de sortie personnalisées. Si une chaîne personnalisée est entrée, vous devez remplacer la GetVaryByCustomString méthode dans le fichier Global.asax de l’application.

Note

Les VaryByCustom paramètres sont les mêmes que ceux utilisés par l’attribut VaryByCustom de la @ OutputCache directive.

S’applique à

Voir aussi