A
alex
Ok there are two ways to specify output cache settings for the user
control.
1) using attributes
[PartialCaching(20)]
public class ctlMine : UserControl{}
2) and using @ OutputCache directive.
They both are "static". Now if I need to load a user control into
various pages and specify particular output caching settings per page,
how do I do this? What is the way to set it in the codebehind using
variables for cache duration, etc.
I can create a class:
System.Web.UI.PartialCachingAttribute cacheRules = new
System.Web.UI.PartialCachingAttribute(CacheDuration, null, null, null);
but how to I attach it to the control?
Thanks.
control.
1) using attributes
[PartialCaching(20)]
public class ctlMine : UserControl{}
2) and using @ OutputCache directive.
They both are "static". Now if I need to load a user control into
various pages and specify particular output caching settings per page,
how do I do this? What is the way to set it in the codebehind using
variables for cache duration, etc.
I can create a class:
System.Web.UI.PartialCachingAttribute cacheRules = new
System.Web.UI.PartialCachingAttribute(CacheDuration, null, null, null);
but how to I attach it to the control?
Thanks.