OutputCacheProfile.VaryByCustom Egenskap
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
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.