Solved

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

Posted on 2011-09-28
3
281 Views
Last Modified: 2012-05-12
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
Comment
Question by:recruitit
  • 2
3 Comments
 
LVL 16

Expert Comment

by:Easwaran Paramasivam
Comment Utility
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
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 500 total points
Comment Utility
0
 

Author Closing Comment

by:recruitit
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now