ControlCachePolicy.VaryByControl Property

Definition

Gets or sets a list of control identifiers to vary the cached output by.

public string VaryByControl { get; set; }

Property Value

A semicolon-separated list of strings used to vary a user control's output cache. These strings represent the ID property values of ASP.NET server controls declared in the user control.

Exceptions

The user control is not associated with a BasePartialCachingControl and is not cacheable.

-or-

The VaryByControl property is set outside of the initialization and rendering stages of the control.

Applies to

Producto Versiones
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also