Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 306
  • Last Modified:

ASP.NET Output Caching and Google+1, Twitter Follow, and Facebook Like Buttons

I have a situation where I want to Output cache our entire web page in asp.net, but I do not want to cache twitter/google+1/facebook like buttons.  I looked at the substitution controls but that doesnt look like the right thing to use, I need to exclude a block of html from caching but because I am using master pages, several in fact, partial caching isnt a great solution.
0
recruitit
Asked:
recruitit
  • 2
1 Solution
 
Easwaran ParamasivamCommented:
Apply page level caching using @outputcache and in the varybycontrol give the button controls that you like to click. Refer: http://www.codeproject.com/KB/web-cache/OutputCache.aspx

One more option there, implement some user control and dont set the outputcache for your control: Refer: http://aspadvice.com/blogs/joteke/archive/2007/10/31/ASP.NET_3A00_-clear-user-control-output-cache.aspx
0
 
recruititAuthor Commented:
Thanks, using asp:Substitution controls worked, I wasnt using them properly before (Method has to be static).  Using them I can dynamically create html content like the google facebook and twitter buttons on the fly that are not cached.

Thanks!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now