Export (0) Print
Expand All

HttpResponse.CacheControl Property

Sets the Cache-Control HTTP header to Public or Private.

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

public string CacheControl { get; set; }
/** @property */
public String get_CacheControl ()

/** @property */
public void set_CacheControl (String value)

public function get CacheControl () : String

public function set CacheControl (value : String)

Not applicable.

Property Value

"Public" or "Private".

Exception typeCondition

ArgumentException

CacheControl is an invalid cache control value (not Private or Public).

The values for Private and Public are strings and must be enclosed in quotation marks (" ").

The CacheControl, Expires, and ExpiresAbsolute properties have been deprecated in favor of the methods of the HttpCachePolicy class available through the Cache intrinsic object to control the IIS output cache and client caches.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft