Post cache substitution, DOT NET Programming

Assignment Help:

What is Post Cache substitution?

The Post cache substitution is used when we want to cache the complete page but also require some of the dynamic region inside that cached page. Some examples such as RandomPhotos, QuoteoftheDay, and AdRotator etc.  Where we can implement the Post Cache Substitution.

Post-cache substitution can be achieved by 2 means:

1) Call the new Response.WriteSubstitution process, passing it a reference to the desired substitution method callback.

2) Add a control to the page from  the desired location, and fixed  its methodName attribute to the name of the callback method.

816_post cache substitution.png

Figure: - "Writesubstitution" in action

We have "GetDateToString()" a static function  . We pass the response substitution callback to the "WriteSubstitution" process. So now when ASP.NET page framework retrieves the cached page, it automatically triggers your callback process to get the dynamic content. Now it inserts your content into the cached HTML of the page. Even if your page hasn't been cached yet (for example, it's being rendered for the first time), ASP.NET still calls your callback into the same way to get the dynamic content. So you create a process which generates some dynamic content, and by doing so you assure  that your process is always called, and it's content is never cached.

The example above was by using "WriteSubstitution" now lets try to see how we can do by using "" control. You can get the "" control from the editor toolbox.

75_post cache substitution1.png

Figure: - Substitution Control

1735_post cache substitution2.png

Figure: - Substitution in Action


Related Discussions:- Post cache substitution

What do you mean by data encapsulation, What do you mean by data encapsulat...

What do you mean by data encapsulation? Data encapsulation is a method of binding data and code in single unit known as object and hiding all the implementation details of a cl

Component diagrams, Explain Component diagrams Package: - The Pa...

Explain Component diagrams Package: - The Package logically make group of element of a UML model. Component: - It is the actual physical module or implementation of

Manual reset event and auto reset event, What is Manual Reset Event and Aut...

What is Manual Reset Event and Auto Reset Event? The Threads that call one of the wait methods of a synchronization event should wait until other thread signals the event by ca

Application for online game, Introduction This assignment aims to give yo...

Introduction This assignment aims to give you a "real world experience" that occurs far too often in the workplace. You have been hired to complete as much as possible a project

Http post images to a php file on web server, Need code for Windows 8 and W...

Need code for Windows 8 and Windows Phone 8 that will http post images to a php file on web server. Project Description: I am working on two projects on both Windows 8/RT and

School management system, Project Description: I need complete school ma...

Project Description: I need complete school management software, where user will get four module for their enquiry, 1> Student management 2> Staff complete payrole system

Difference between class and structure, What is the difference between Clas...

What is the difference between Class and structure's? The main differences between them are as follows:- 1) The Structure is value types while classes are referen

Want microsoft crm dynamics crm 2011 or 2013 programmer, Want Microsoft CRM...

Want Microsoft CRM Dynamics CRM 2011 or 2013 programmer Project Description: Need to do customizations in CRM itself and integrate CRM 2011 with SAP Business One and HTML web

Explain custom activities, Explain Custom Activities. In addition to th...

Explain Custom Activities. In addition to the standard activities available within the base activity library, you can make new activities to meet exact business needs. Creating

Black box testing & white box testing, What is black box testing & White bo...

What is black box testing & White box testing? The Black box testing is also termed as functional testing. It ignores how the internal functionality of a system works & depends

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd