There are two wasy to control the caching of Web pages in ASP.NET. You can use the @ OutputCache directive to control page output caching in ASP.NET, or you can control the cache programmatically through Response.Cache.SetCacheability method.
To turn off the output cache for an ASP.NET Web page at the client location and at the proxy location, set the Location attribute value to none, and then set the VaryByParam value to none in the @ OutputCache directive. Use the following code samples to turn off client and proxy caching.
Declarative Approach:
<%@ OutputCache Location="None" VaryByParam="None" %>
Programmatic Approach:
Response.Cache.SetCacheability
(HttpCacheability.NoCache);