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

Difference between factory and abstract factory patterns, What is the diffe...

What is the difference between Factory and Abstract Factory Patterns? The main basic difference between factory and Abstract factory is factory method uses the  inheritance to

What is asp.net ajax, What is ASP.NET AJAX? ASP.NET AJAX, mostly called...

What is ASP.NET AJAX? ASP.NET AJAX, mostly called AJAX, is a set of extensions of ASP.NET. It is developed by Microsoft to execute AJAX functionalities in Web applications. ASP

Difference between server.transfer and response.redirect, What is the diffe...

What is the difference between Server.Transfer and response.Redirect? The difference  between the Server.Transfer and the response.Redirect them are as follows:- 1)Response.

Need vb.net windows application programmer, We need vb.net windows applicat...

We need vb.net windows application programmer with min six years exp to work on our email marketing project Project Description: We need a windows application vb.net programm

What does a break statement do in the switch statement, What does a break s...

What does a break statement do in the switch statement? The switch statement is a selection control statement that is used to handle many choices and transfer control to the ca

Package forwarding website design and develop, Project Description: We w...

Project Description: We want to prepare a package forwarding website. Package forwarding refers to a service where US forwarder provides International shoppers with a US address

Need expert web developer, Web Developer Project Description: We are ...

Web Developer Project Description: We are in need of an expert web developer for long term connection; please apply with samples if you have the subsequent skills: ASP.NET

Advantages of using uml, What are advantages of using UML? As the name ...

What are advantages of using UML? As the name suggests the UNIFIED MODELING LANGUAGE, The Modeling has been around for years, not only in the software field but also in other t

Print pyramids of numbers - c# program, Print Pyramids of Numbers - C# Prog...

Print Pyramids of Numbers - C# Program Hello can you please provide me some examples regarding to the Print Pyramids of Numbers in C#.

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