System.Web Namespace HttpResponse Class
Sets the Cache-Control HTTP header to Public or Private.
[ VB ]
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 );
"Public" or "Private".
Exception Type |
Condition |
ArgumentException |
Occurs when 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.
HttpResponse Members