Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : 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 April 28th, 2013, 09:31 AM
Friend of Wrox
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default Partial Page Cache?

Considering caching of webpages, like what is discussed on pages 594 to 599 in the book, I am wondering can you not also cache specific partial parts of a webpage as well? Can you not take a part of a webpage that is contained under opening and closing <div> tags and cache that as well? As I recall the previous book on ASP.NET 4.0 had examples of partial page cacheing? What about cacheing a grid or a drop down list on page? Can you cache them as well? What about cacheing .ascx files, since they are reused on a regular basis, can you not have them cached and have a short cache duration of maybe 1 or 2 minutes to speed up or enhance scalability of your application?
 
Old April 28th, 2013, 09:55 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You can't do partial page caching when using output caching (unless you use the Substitution control which I don't recommend). Instead, use User Controls for those parts you want to cache. So if you want to cache a grid, add it to a user control and then add that control to the page.

Be careful though: things like grid tend to contain dynamic data that you don't want to cache, or at least not for too long.

Do you ever Google before asking questions like this? You will find so much more information and learn so much more if you Google for some core terms and then read the first 10 hits or so.

https://www.google.com/#output=searc...=1050&bih=1245

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Partial Page Referesh in mvc monika.vasvani BOOK: Professional ASP.NET MVC 3 0 July 2nd, 2012 05:19 PM
Remove Page from Cache Harjinder Forum and Wrox.com Feedback 0 August 8th, 2008 08:53 AM
Partial page update with Script call backs prak_p2p_wrx BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 March 14th, 2008 05:38 AM
Page Cache Issue itHighway HTML Code Clinic 2 August 7th, 2005 10:37 PM
Output page cache question flyin General .NET 0 September 11th, 2004 04:38 PM





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