ControlCachePolicy.VaryByParams Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets a list of GET or POST parameter names to vary the cached output by.

Namespace:   System.Web.UI
Assembly:  System.Web (in System.Web.dll)

public HttpCacheVaryByParams VaryByParams { get; }

Property Value

Type: System.Web.HttpCacheVaryByParams

A semicolon-separated list of strings used to vary the output cache.

Exception Condition
HttpException

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

By default, these strings correspond to a query string value sent with the GET method or to a parameter sent using the POST method. When the VaryByParams property is set to multiple parameters, the output cache contains a different version of the requested document for each specified parameter. Possible values include "none", "*", and any valid query string or POST parameter name.

.NET Framework
Available since 2.0
Return to top
Show: