Solved

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

Posted on 2011-09-28
3
283 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
ID: 36715154
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
ID: 36715162
0
 

Author Closing Comment

by:recruitit
ID: 36715854
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

943 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

10 Experts available now in Live!

Get 1:1 Help Now