Wrox Programmer Forums
|
BOOK: Professional ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Professional ASP.NET 4 in C# and VB by Bill Evjen, Scott Hanselman, Devin Rader; ISBN: 9780470502204
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 27th, 2010, 11:03 AM
Authorized User
 
Join Date: Oct 2009
Posts: 22
Thanks: 2
Thanked 10 Times in 7 Posts
Default OutputCache Problem

Hi,

On page 213 of your book you describe output caching when using Master Pages. There are two sentences about using the OutputCache directive on a master page:

1. You can't put it on a Master Page, because on the page's second retrieval you get an error because the application can't find the cached page.
2. The OutputCache directive on the master page will not cause the master page to produce an error, but it will not be cached. *I am assuming that you mean the first time it won't show an error, but the second time you call it you will get an error, like you mention in your first point*


Now, I tried putting a OutputCache directive on a Master Page, but I am not experiencing the same behavior you mentioned. Running a content page that uses this master page I instantly get an error stating:


Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The directive 'outputcache' is not allowed in this page.


So, am I just misunderstanding what you wrote or is this an error in the book.


Thanks,

Waleed.









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.