0

I have some questions about OutPutCache to UserControl. I'm a fresher on OutPutCache.

1、I found that I can't set the location property. Where does the UserControl existed? 2、It seems that the UserControl would inherit outputcache features from the page. So how can I set the no-store property to the UserControl individually? Such as: I cached a news page, it will be refreshed daily. but I want to get the latest views everytime. or I only want to get the login username. What should I do?

I will be very appreciate for your help! Best Regards,

David Peng

4

1 回答 1

0

You could use <asp:substitution> control and load UserControl that cannot be cached in substitution control, look at this article about donut caching.

Since substitution control can just take string and render it you will have to render user control to string and assign that string to substitution control, here are the details How to use ASP.Net server controls inside of Substitution control?

于 2012-05-06T09:16:27.747 回答