This documentation is archived and is not being maintained.

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

This API supports the .NET Framework 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,
	BuildMethod buildMethod
)

Parameters

parent
Type: System.Web.UI.Control
The server control to contain the StaticPartialCachingControl instance.
ctrlID
Type: System.String
The identifier assigned to the control by ASP.NET.
guid
Type: System.String
The globally unique identifier for the cached control.
duration
Type: System.Int32
The length of time the control's output is cached.
varyByParams
Type: System.String
A string of the query string or form POST parameters by which to vary the server control in the cache.
varyByControls
Type: System.String
A string that lists the server-control properties by which to vary the user control in the cache.
varyByCustom
Type: System.String
A user-defined string that contains custom output-cache parameter values.
buildMethod
Type: System.Web.UI.BuildMethod
A delegate that calls the method to build the control.

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.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: