HttpCachePolicyWrapper.SetCacheability Method (HttpCacheability, String)

 

Sets the Cache-Control header to the specified HttpCacheability value and appends an extension to the directive.

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

public override void SetCacheability(
	HttpCacheability cacheability,
	string field
)

Parameters

cacheability
Type: System.Web.HttpCacheability

The HttpCacheability enumeration value to set the header to.

field
Type: System.String

The cache-control extension to add to the header.

Exception Condition
ArgumentNullException

field is null.

ArgumentException

cacheability is not Private or NoCache.

.NET Framework
Available since 3.5
Return to top
Show: