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

Various ways of authentication techniques in asp.net, What are the various ...

What are the various ways of authentication techniques in ASP.NET? The Selection of  an authentication provider is as simple as making an entry in  the web.config file of  the

Perform arithmetic operations - c# program, Perform Arithmetic Operations -...

Perform Arithmetic Operations - c# Program Hello, i didn't find the correct way of using arithmetic operations in c#. I am beginner for this language. Please suggest me some e

What is difference between namespace and assembly, What is Difference betwe...

What is Difference between NameSpace and Assembly? Following are the differences among namespace and assembly: Assembly is physical grouping of logical units, Namespace, log

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#.

I need remote chat application for desktop, I need Remote chat Application ...

I need Remote chat Application for desktop Project Description: I want a team of .net experts who will design me a website and a remote desktop chat application as like  live

A website similar to coachup, Project Description: We are looking for sa...

Project Description: We are looking for same usability/options of coachup.com thus, we will have different own UI design. Conditions: State your price and please describe/

C# , I want to solve the assignments related to C# , ASP.net and Sql server...

I want to solve the assignments related to C# , ASP.net and Sql server

What is an object, What is an object? They are instance of classes. It ...

What is an object? They are instance of classes. It is a basic unit of a system. An object is an entity that has attributes, behavior, and identity. Attributes and behavior of

What happens when aspx page is requested from browser ?, The steps that occ...

The steps that occur when we request a ASPX page are as follows:- 1) The browser sends the request to the webserver. Now  assume that the webserver at the other end is IIS. 2

Web based program prepared with net c# and sql server, Project Description:...

Project Description: We have a web based program prepared with .NET C# and Microsoft SQL Server. There are some reports needs to be created. Required Skills. - High Pro

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