System.Web.UI.ControlCachePolicy.SetVaryByCustom Method

Sets a list of custom strings that the output cache will use to vary the user control.

Syntax

public void SetVaryByCustom (string varyByCustom)

Parameters

varyByCustom
The list of custom strings.

Remarks

If you pass "browser" as the varyByCustom parameter, the user control will be varied by browser type and major version number. If another custom string is entered, you must override the System.Web.HttpApplication.GetVaryByCustomString(System.Web.HttpContext, string) method in your application's Global.asax file.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0