| |||||
Substitution Control SyntaxASP.NET Syntax ASP.NET Syntax for Web Controls Specifies a section on an output-cached Web page that is exempt from caching. At this location, dynamic content is retrieved and substituted for the Substitution control. For information on the individual members of this class, see Substitution in the class library. RemarksThe Substitution control specifies a section for dynamic content on an output-cached Web Forms page. The Substitution control offers a simplified solution to partial page caching for pages where the majority of the content is cached. You can output-cache the entire page, and then use Substitution controls to specify the parts of the page that are exempt from caching. Syntax ExampleThe following example demonstrates how to add a Substitution control declaratively to an output-cached Web page. When the page loads, the current date and time are displayed to the user in a label. This section of the page is cached and updated every 120 seconds. When the Substitution control executes, it calls the <p>This section of the page is cached</p> <asp:label id="cachedContent" runat="Server" /> <p>This section of the page is exempt from output caching</p> <p id="msg"><asp:substitution id="subContent" methodname = "getCurrentDateTime" runat="Server" /> </p> <p><asp:button id="RefreshButton" text = "Refresh Page" runat="Server" /> </p> See AlsoSubstitution Class Substitution Web Server Control |
| ||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme