Tuesday, June 17, 2008

how to kill cache of page for new loding of page

Write this code on pageLoad or PostBack Event.

Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();

Cache.Remove("CacheID");

1 comment:

Anonymous said...
This comment has been removed by a blog administrator.