StaticPartialCachingControl.BuildCachedControl Method (Control, String, String, Int32, String, String, String, String, BuildMethod)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

This API supports the product infrastructure and is not intended to be used directly from your code.

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.

Namespace:   System.Web.UI
Assembly:  System.Web (in System.Web.dll)

public static void BuildCachedControl(
	Control parent,
	string ctrlID,
	string guid,
	int duration,
	string varyByParams,
	string varyByControls,
	string varyByCustom,
	string sqlDependency,
	BuildMethod buildMethod


Type: System.Web.UI.Control

The server control to contain the StaticPartialCachingControl instance.

Type: System.String

The identifier assigned to the control by ASP.NET.

Type: System.String

The globally unique identifier for the cached control.

Type: System.Int32

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

Type: System.String

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

Type: System.String

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

Type: System.String

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

Type: System.String

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

Type: System.Web.UI.BuildMethod

A delegate that calls the method to build the control.

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.

.NET Framework
Available since 2.0
Return to top