In a webpage, only some part of content is static. How can we apply caching only to that part?
By using Page Fragment caching, we can apply caching only to the specific portion of webpage. By using user controls, we can implement this. Create a user control with the static content in web page and apply caching to that user control. Include the following directive in the user control.
<%@ OutputCache Duration="300" VaryByParam="None" %>
ASP.NET Interview questions · · · ·