OutputCacheProfile.VaryByCustom Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the VaryByCustom property.
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
Property Value
The VaryByCustom value.
- Attributes
Examples
The following code example shows how to use the VaryByCustom property.
// 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
Remarks
The VaryByCustom can be any text that represents custom output-caching requirements. If a custom string is entered, you must override the GetVaryByCustomString method in the application's Global.asax file.
Note
The VaryByCustom settings are the same ones used by the VaryByCustom
attribute of the @ OutputCache
directive.