OutputCacheProfile.VaryByCustom Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene o imposta la VaryByCustom proprietà .
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
Valore della proprietà
Il valore VaryByCustom.
- Attributi
Esempio
Nell'esempio di codice seguente viene illustrato come utilizzare la VaryByCustom proprietà .
// 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
Commenti
VaryByCustom Può essere qualsiasi testo che rappresenta i requisiti personalizzati di memorizzazione nella cache dell'output. Se viene immessa una stringa personalizzata, è necessario eseguire l'override del GetVaryByCustomString metodo nel file Global.asax dell'applicazione.
Annotazioni
Le VaryByCustom impostazioni sono le stesse usate dall'attributo VaryByCustom della @ OutputCache direttiva .