October 2010
Intermediate to advanced
1920 pages
73h 55m
English
Using post-cache substitution is appropriate only when working with a string of text or HTML. If you need to perform more complex partial page caching, you should take advantage of User Controls.
You can cache the rendered contents of a User Control in memory in the same way as you can cache an ASP.NET page. When you add an <%@ OutputCache %> directive to a User Control, the rendered output of the User Control is cached.
When you cache a User Control, the content is cached on the web server and not on any proxy servers or web browsers. When a web browser or proxy server caches a page, it always caches an entire page.
For example, the Movies User Control in Listing 29.21 displays all the rows from the Movies ...