DekGenius.com
[ Team LiB ] Previous Section Next Section

PartialCachingAttribute

System.Web.UI (system.web.dll)sealed class

This class specifies the attributes that can be set on user controls for fragment caching. To enable fragment caching, use the <OutputCache> directive at the beginning of the appropriate .ascx file. ASP.NET will automatically generate this attribute when the user control is requested. Alternatively, you can leave out the directive and use this attribute in the code-behind class for the user control.

public sealed class PartialCachingAttribute : Attribute {
// Public Constructors
   public PartialCachingAttribute(int duration);
   public PartialCachingAttribute(int duration, string varyByParams, 
        string varyByControls, string varyByCustom);
   public PartialCachingAttribute(int duration, string varyByParams, 
        string varyByControls, string varyByCustom, bool shared);
// Public Instance Properties
   public int Duration{get; }
   public bool Shared{get; }
   public string VaryByControls{get; }
   public string VaryByCustom{get; }
   public string VaryByParams{get; }
}

Hierarchy

System.Object System.Attribute PartialCachingAttribute

Valid On

Class

    [ Team LiB ] Previous Section Next Section