Rediger

Del via


OutputCacheProfile.VaryByCustom Property

Definition

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.

Applies to

See also