How to put in cache only part of webpage
-
Hello! I have a project in C# ASP.NET. It is some kind of web-office for our clients. I need to forbid caching of all information and put in cache all images in order to save time and money of our clients. Thank you.
Hii Nimua, Solution: Use Substitution control for rendering that part which need no caching. Explanation: ASP.NET 2.0 introduces a new feature called Post-Cache Substitution, which is aimed at optimizing the development experience for this mostly-cached page scenario. Rather than requiring page developers to mark page regions (user controls) as cached, post-cache substitution allows them to output cache an entire page and then simply identify regions of the page that should be exempt from caching. It also allows control developers to prevent their rendering from from being cached. In the above example, an AdRotator control that takes advantage of post-cache substitution would be able to serve a different advertisement on each request even if its parent page were cached. For complete solution, see http://dotnetjunkies.com/QuickStartv20/aspnet/doc/ctrlref/standard/substitution.aspx[^]
Bijay Bhaskar Deo Thanks & Regard