This documentation is archived and is not being maintained.
HttpResponse.CacheControl Property
.NET Framework 1.1
Sets the Cache-Control HTTP header to Public or Private.
[Visual Basic] Public Property CacheControl As String [C#] public string CacheControl {get; set;} [C++] public: __property String* get_CacheControl(); public: __property void set_CacheControl(String*); [JScript] public function get CacheControl() : String; public function set CacheControl(String);
Property Value
"Public" or "Private".
Exceptions
| Exception Type | Condition |
|---|---|
| ArgumentException | CacheControl is an invalid cache control value (not Private or Public). |
Remarks
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.
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
HttpResponse Class | HttpResponse Members | System.Web Namespace
Show: