Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 5th, 2014, 01:41 PM
Authorized User
Points: 416, Level: 7
Points: 416, Level: 7 Points: 416, Level: 7 Points: 416, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
  #2 (permalink)  
Old March 6th, 2014, 08:28 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 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!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:46 PM.


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