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.

public:
 static void BuildCachedControl(System::Web::UI::Control ^ parent, System::String ^ ctrlID, System::String ^ guid, int duration, System::String ^ varyByParams, System::String ^ varyByControls, System::String ^ varyByCustom, System::Web::UI::BuildMethod ^ buildMethod);
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);
static member BuildCachedControl : System.Web.UI.Control * string * string * int * string * string * string * System.Web.UI.BuildMethod -> unit
Public Shared Sub BuildCachedControl (parent As Control, ctrlID As String, guid As String, duration As Integer, varyByParams As String, varyByControls As String, varyByCustom As String, buildMethod As 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

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.

public:
 static void BuildCachedControl(System::Web::UI::Control ^ parent, System::String ^ ctrlID, System::String ^ guid, int duration, System::String ^ varyByParams, System::String ^ varyByControls, System::String ^ varyByCustom, System::String ^ sqlDependency, System::Web::UI::BuildMethod ^ buildMethod);
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);
static member BuildCachedControl : System.Web.UI.Control * string * string * int * string * string * string * string * System.Web.UI.BuildMethod -> unit
Public Shared Sub BuildCachedControl (parent As Control, ctrlID As String, guid As String, duration As Integer, varyByParams As String, varyByControls As String, varyByCustom As String, sqlDependency As String, buildMethod As 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

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.

public:
 static void BuildCachedControl(System::Web::UI::Control ^ parent, System::String ^ ctrlID, System::String ^ guid, int duration, System::String ^ varyByParams, System::String ^ varyByControls, System::String ^ varyByCustom, System::String ^ sqlDependency, System::Web::UI::BuildMethod ^ buildMethod, System::String ^ providerName);
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);
static member BuildCachedControl : System.Web.UI.Control * string * string * int * string * string * string * string * System.Web.UI.BuildMethod * string -> unit
Public Shared Sub BuildCachedControl (parent As Control, ctrlID As String, guid As String, duration As Integer, varyByParams As String, varyByControls As String, varyByCustom As String, sqlDependency As String, buildMethod As BuildMethod, providerName As String)

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