asp.net.ph

Response.CacheControl Property

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 );

Property Value

"Public" or "Private".

Exceptions


Exception Type Condition
ArgumentException Occurs when 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.

See Also

HttpResponse Members Skip Navigation Links




Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note