OutputCacheProfile.VaryByCustom Egenskap

Definition

Hämtar eller anger egenskapen VaryByCustom .

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

Egenskapsvärde

Värdet VaryByCustom.

Attribut

Exempel

Följande kodexempel visar hur du använder egenskapen VaryByCustom .


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

Kommentarer

VaryByCustom Kan vara valfri text som representerar anpassade krav för cachelagring av utdata. Om en anpassad sträng anges måste du åsidosätta GetVaryByCustomString metoden i programmets Global.asax-fil.

Note

VaryByCustom Inställningarna är samma som används av VaryByCustom direktivets @ OutputCache attribut.

Gäller för

Se även