
54
|
Chapter 3: Web Forms
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
As explained in the “Using @ Directives” section earlier in this chapter, you can
also have ASP.NET cache multiple versions of a page on the basis of specific
HTTP headers by using the
VaryByHeader attribute, or you can cache multiple
versions of a user control on the basis of some of its properties by using the
VaryByControl attribute. Caching the output of a user control is essentially the
same process as that shown in Example 3-7, except that you may not use the
VaryByHeader attribute in a user control.
Additional Resources
The following sites provide more information on topics discussed in this chapter:
http://www.gotdotnet.com/QuickStart/aspplus/
The ASP.NET QuickStart samples, which can also be installed locally,
provide a wide range of examples and sample code and explanations that can
be very useful when starting out. The GotDotNet.com site also has sample
code available from other users.
http://www.asp.net/forums/
The ASP.NET forums includes forums specific to a wide variety of ASP.NET
programming topics, including Web Forms, Caching, State Management,
and many more. Questions are answered by experts within the ASP.NET
developer community, and even sometimes by members of the ASP.NET
development team themselves.
Example 3-7. Output caching in ASP.NET
<%@ Page ...