Click here to Skip to main content
15,911,848 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
what is the use of substitution control in asp.net
Posted
Comments
Sandeep Mewara 18-Jul-12 5:22am    
MSDN? Google?

It's well documented on MSDN:
http://msdn.microsoft.com/en-us/library/ms228212.aspx[^]

The Substitution control lets you create areas on the page that can be updated dynamically and then integrated into a cached page.

Use the Substitution control to specify a section of an output-cached Web page where you want to display dynamic content. The Substitution control offers a simplified solution to partial page caching for pages where the majority of the content is cached. You can output-cache the entire page, and then use Substitution controls to specify the parts of the page that are exempt from caching. Cached regions execute only once and are read from the cache until the cache entry expires or is purged. Dynamic regions execute every time that the page is requested. This caching model simplifies the code for pages that are primarily static, because you do not have to encapsulate the sections to cache in Web user controls. For example, this caching model is useful in a scenario where you have a page that contains static content, such as news stories, and an AdRotator control that displays advertisements. The news stories do not change frequently, which means that they can be cached. However, every time that a user requests the page, you want to display a new advertisement. The AdRotator control directly supports post-cache substitution and renders a new advertisement every time that the page posts back, regardless of whether the page is cached.
 
Share this answer
 
v2
Hi,
Quote:
what is the use of substitution control in asp.net?

The Substitution control specifies a section on an output-cached Web page that is exempt from caching. Use the Substitution control to specify a section on an output-cached Web page where you want dynamic content substituted for the control.

Follow the like below for more information:
Substitution Web Server Control Overview[^]


--Amit
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900