System.Web.HttpResponse.CacheControl Property

Gets or sets the Cache-Control HTTP header that matches one of the System.Web.HttpCacheability enumeration values.

Syntax

public string CacheControl { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The values for Private, Public, and No-Cache are strings and must be enclosed in quotation marks (" "). If the HttpResponse.CacheControl property is set to a value that does not match one of the System.Web.HttpCacheability enumeration values, then an ArgumentException is thrown. If the HttpResponse.CacheControl property is not set, the cacheability of the response is set to HttpCacheability.NoCache.

The CacheControl, HttpResponse.Expires, and HttpResponse.ExpiresAbsolute properties have been deprecated. Instead, the methods of the System.Web.HttpCachePolicy class are available through the HttpResponse.Cache intrinsic object to control the Internet Information Services (IIS) output cache and client caches.

Requirements

Namespace: System.Web
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0