Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
What is Fragment Cache? Who do we need it?
Annathurai Subbaiah
Feb 26 2010 9:34 AM
3.3k
Reply
Fragment Caching :
Its used to cach the particular portion from a web page. If we have four user controls on a web page we do not want to cache the entire page instance of we need to cache only two controls from a web page. In this case we should go for fragment caching. It caches when the user control loaded at runtime.
Example :
We need to create two user control to test this fragment caching. In a first .ascx page we should place a label control and also specify assing date and time in page_load.
In the second .ascx page same thing we need to do and we need to place radiobuttonlist control and command buttong to refresh the page. In the top of the second .ascx page should include outputcache directive like this
<%@OutputCache VarByParam="none" VarByControl="rdbuttonid" Duration="3" %>
This is very useful for cach the particular part from the page.
Attachment:
FragmentCache.zip
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
What is Output Caching? When it is required for us?
date format problem..