Search This Blog

Friday, March 8, 2013

No cache ASP.NET

ASP.NET > HttpCachePolicy > SetCacheability

HttpCachePolicy.SetCacheability Method (HttpCacheability)


Sets the Cache-Control header to one of the values of HttpCacheability.


Example:

Set the Cache-Control header to no-cache.
Response.Cache.SetCacheability(HttpCacheability.NoCache);