IT:AD:ASP.NET:Win Forms:Caching


At Page AND WebControl Level, one can use:

<%@OutputCache Duration="60" VaryByParam="none" %>

If you want to cache 99% of the page or control, but vary a piece of it – what they call Donut Caching – then you may want the Substitution control, which renders a string:

<callout icon="true" type="class="header">
  <h1>Caching Samples</h1>
  <div class="loginstatus">
    <asp:Substitution ID="Substitution1" runat="server" MethodName="LoginText" /">
  </callout>
</div>