StaticPartialCachingControl.BuildCachedControl Method

Definition

Builds a StaticPartialCachingControl object in the user control (.ascx file) and adds it to the containing server control.

Overloads

BuildCachedControl(Control, String, String, Int32, String, String, String, BuildMethod)

Builds a StaticPartialCachingControl object with the parameters specified in the user control (.ascx file) and adds it as a parsed sub-object to the containing server control.

BuildCachedControl(Control, String, String, Int32, String, String, String, String, BuildMethod)

Builds a StaticPartialCachingControl object with the parameters specified in the user control (.ascx file) and adds it as a parsed sub-object to the containing server control.

BuildCachedControl(Control, String, String, Int32, String, String, String, String, BuildMethod, String)

Builds a new instance of the StaticPartialCachingControl class, for a control that is defined in an .ascx file.

BuildCachedControl(Control, String, String, Int32, String, String, String, BuildMethod)

Builds a StaticPartialCachingControl object with the parameters specified in the user control (.ascx file) and adds it as a parsed sub-object to the containing server control.

C#
public static void BuildCachedControl(System.Web.UI.Control parent, string ctrlID, string guid, int duration, string varyByParams, string varyByControls, string varyByCustom, System.Web.UI.BuildMethod buildMethod);

Parameters

parent
Control

The server control to contain the StaticPartialCachingControl instance.

ctrlID
String

The identifier assigned to the control by ASP.NET.

guid
String

The globally unique identifier for the cached control.

duration
Int32

The length of time the control's output is cached.

varyByParams
String

A string of the query string or form POST parameters by which to vary the server control in the cache.

varyByControls
String

A string that lists the server-control properties by which to vary the user control in the cache.

varyByCustom
String

A user-defined string that contains custom output-cache parameter values.

buildMethod
BuildMethod

A delegate that calls the method to build the control.

Remarks

The BuildCachedControl method builds a cached control with no relationship to a Microsoft SQL Server database table.

The BuildCachedControl method is intended for use by the ASP.NET page framework and should not be called directly by developers.

See also

Applies to

.NET Framework 4.8.1 a další verze
Produkt Verze
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

BuildCachedControl(Control, String, String, Int32, String, String, String, String, BuildMethod)

Builds a StaticPartialCachingControl object with the parameters specified in the user control (.ascx file) and adds it as a parsed sub-object to the containing server control.

C#
public static void BuildCachedControl(System.Web.UI.Control parent, string ctrlID, string guid, int duration, string varyByParams, string varyByControls, string varyByCustom, string sqlDependency, System.Web.UI.BuildMethod buildMethod);

Parameters

parent
Control

The server control to contain the StaticPartialCachingControl instance.

ctrlID
String

The identifier assigned to the control by ASP.NET.

guid
String

The globally unique identifier for the cached control.

duration
Int32

The length of time the control's output is cached.

varyByParams
String

A string of the query string or form POST parameters by which to vary the server control in the cache.

varyByControls
String

A string that lists the server-control properties by which to vary the user control in the cache.

varyByCustom
String

A user-defined string that contains custom output-cache parameter values.

sqlDependency
String

A semicolon-delimited string that specifies which databases and tables to use for the Microsoft SQL Server cache dependency.

buildMethod
BuildMethod

A delegate that calls the method to build the control.

Remarks

The BuildCachedControl method builds a cached control with a relationship to a SQL Server database table specified by the sqlDependency parameter.

The StaticPartialCachingControl method is intended for use by the ASP.NET page framework and should not be called directly by developers.

See also

Applies to

.NET Framework 4.8.1 a další verze
Produkt Verze
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

BuildCachedControl(Control, String, String, Int32, String, String, String, String, BuildMethod, String)

Builds a new instance of the StaticPartialCachingControl class, for a control that is defined in an .ascx file.

C#
public static void BuildCachedControl(System.Web.UI.Control parent, string ctrlID, string guid, int duration, string varyByParams, string varyByControls, string varyByCustom, string sqlDependency, System.Web.UI.BuildMethod buildMethod, string providerName);

Parameters

parent
Control

The server control that is used as the container for the StaticPartialCachingControl instance.

ctrlID
String

The ID that is assigned to the control by ASP.NET.

guid
String

The globally unique identifier (GUID) for the cached control.

duration
Int32

The length of time that the control's output is cached.

varyByParams
String

A string of the query string or form POST parameters by which to vary the user control in the cache.

varyByControls
String

A string that lists the server-control properties by which to vary the user control in the cache.

varyByCustom
String

A user-defined string that contains custom output-cache parameter values.

sqlDependency
String

A semicolon-delimited string that specifies which databases and tables to use for the Microsoft SQL Server cache dependency.

buildMethod
BuildMethod

A delegate that calls the method that builds the control.

providerName
String

The name of the provider that is used to store the output-cached control.

Applies to

.NET Framework 4.8.1 a další verze
Produkt Verze
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1