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 March 5th, 2014, 01:41 PM
Authorized User
 
Join Date: Nov 2013
Posts: 84
Thanks: 29
Thanked 2 Times in 2 Posts
Default Ch 15 Cache

Hi Imar,

The programmatic caching in the book text addresses the mailbody file, which is text, and it is brought into memory as text. The Try It Out addressed an object which is more complex, but something that is cached only in the code behind.

Can we cache things used in the markup? Specifically, can we cache an image by itself? Is an image somehow different than the text of the mailbody as shown in the book text? I didn't quite see how to pull something from the cache to populate the markup. Maybe I'm missing an important understanding of how the pages ultimately get to the browser window.

For example, if we use an <asp:Image .../> element, can we cache the image that is displayed by that control? If so, how do we do that? Or does that image also have to be converted into a user control? Do you have any examples of that on your site?

Thanks.

Best Regards,
Alan
 
Old March 6th, 2014, 08:28 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

You can cache a lot of data using the .NET , as long as you have a handle on it in memory.

Files displayed with the Image control (or a simple img element) cannot be cached by the .NET cached. These files exist on disk, so it doesn't make sense to cache them in memory as well. However, the browser will cache the file for you, so it only downloads it on the first hit.

You can control how the browser can cache the file in IIS. For more information, check out the IIS website: http://www.iis.net/learn/manage/mana...output-caching

Hope this helps,

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
Ch 4 and Ch 13/15 - controls and the DataPager AlanWheeler BOOK: Beginning ASP.NET 4.5 : in C# and VB 3 February 24th, 2014 04:56 PM
Chapter 15 "Using the Cache API" Server Error Message Caden11998 BOOK: Beginning ASP.NET 4 : in C# and VB 16 August 17th, 2012 02:10 PM
Ch 15 - Security aspcoder BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 7 May 3rd, 2008 02:55 PM
CH.15 NEED HELP stacy BOOK: Beginning ASP 3.0 1 January 21st, 2004 03:37 AM





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