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

 

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,
	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
Available since 1.1
Return to top
Show: