Thursday, October 06, 2005

How to prevent Caching in ASP.NET

There are two ways to prevent cache in ASP.NET

1) Response.Cache.SetCacheability(HttpCacheability.NoCache)

And

2) Response.Cache.SetAllowResponseInBrowserHistory(False)

This code you can right in code behind on_Load events this will not allow user to cache the page or records.




Ritesh Kumar Kesharwani

A D I T I , B A N G A L O R E
Software Professional
Cell : 91-9845657636



Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.

No comments: