ControlCachePolicy.SetVaryByCustom Method (String)
.NET Framework (current version)
Sets a list of custom strings that the output cache will use to vary the user control.
Assembly: System.Web (in System.Web.dll)
Parameters
- varyByCustom
-
Type:
System.String
The list of custom strings.
| Exception | Condition |
|---|---|
| HttpException | The user control is not associated with a BasePartialCachingControl and is not cacheable. |
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 GetVaryByCustomString method in your application's Global.asax file.
.NET Framework
Available since 2.0
Available since 2.0
Show: