p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional ASP.NET 4 : in C# and VB (http://p2p.wrox.com/forumdisplay.php?f=554)
-   -   OutputCache Problem (http://p2p.wrox.com/showthread.php?t=81399)

walbalooshi October 27th, 2010 11:03 AM

OutputCache Problem

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.



All times are GMT -4. The time now is 04:38 PM.

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