共用方式為


StaticPartialCachingControl.BuildCachedControl 方法

定義

建置使用者控制項 (.ascx 檔案) 中的 StaticPartialCachingControl 物件,並將它加入至包含的伺服器控制項。

多載

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

以使用者控制項 (.ascx 檔案) 中指定的參數,建置 StaticPartialCachingControl 物件,並將它當做已剖析子物件加入至包含的伺服器控制項。

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

以使用者控制項 (.ascx 檔案) 中指定的參數,建置 StaticPartialCachingControl 物件,並將它當做已剖析子物件加入至包含的伺服器控制項。

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

針對 .ascx 檔中定義的控制項,建置 StaticPartialCachingControl 類別的新執行個體。

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

以使用者控制項 (.ascx 檔案) 中指定的參數,建置 StaticPartialCachingControl 物件,並將它當做已剖析子物件加入至包含的伺服器控制項。

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)

參數

parent
Control

包含 StaticPartialCachingControl 執行個體的伺服器控制項。

ctrlID
String

ASP.NET 指派給控制項的識別項。

guid
String

快取控制項的全域唯一識別項。

duration
Int32

控制項輸出保留在快取中的時間長度。

varyByParams
String

查詢字串或表單張貼參數的字串,用來變更快取中的伺服器控制項。

varyByControls
String

列出伺服器控制屬性 (Property) 的字串,用於變更快取中的使用者控制項。

varyByCustom
String

使用者定義的字串,其中包含自訂輸出快取參數值。

buildMethod
BuildMethod

委派,呼叫建置控制項的方法。

備註

方法 BuildCachedControl 會建置快取的控制項,且沒有與Microsoft SQL Server資料庫資料表的關聯性。

方法 BuildCachedControl 適用于 ASP.NET 網頁架構,不應由開發人員直接呼叫。

另請參閱

適用於

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

以使用者控制項 (.ascx 檔案) 中指定的參數,建置 StaticPartialCachingControl 物件,並將它當做已剖析子物件加入至包含的伺服器控制項。

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)

參數

parent
Control

包含 StaticPartialCachingControl 執行個體的伺服器控制項。

ctrlID
String

ASP.NET 指派給控制項的識別項。

guid
String

快取控制項的全域唯一識別項。

duration
Int32

控制項輸出保留在快取中的時間長度。

varyByParams
String

查詢字串或表單張貼參數的字串,用來變更快取中的伺服器控制項。

varyByControls
String

列出伺服器控制屬性 (Property) 的字串,用於變更快取中的使用者控制項。

varyByCustom
String

使用者定義的字串,其中包含自訂輸出快取參數值。

sqlDependency
String

以分號分隔的字串,可指定要針對 Microsoft SQL Server 快取相依性使用的資料庫與資料表。

buildMethod
BuildMethod

委派,呼叫建置控制項的方法。

備註

方法 BuildCachedControl 會建置與 參數所 sqlDependency 指定之資料庫資料表SQL Server關聯性的快取控制項。

方法 StaticPartialCachingControl 適用于 ASP.NET 網頁架構,不應由開發人員直接呼叫。

另請參閱

適用於

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

針對 .ascx 檔中定義的控制項,建置 StaticPartialCachingControl 類別的新執行個體。

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)

參數

parent
Control

伺服器控制項,用來做為 StaticPartialCachingControl 執行個體的容器。

ctrlID
String

ASP.NET 指派給控制項的識別項。

guid
String

快取控制項的全域唯一識別項 (GUID)。

duration
Int32

快取控制項輸出的時間長度。

varyByParams
String

查詢字串或表單 POST 參數的字串,用來變更快取中的使用者控制項。

varyByControls
String

列出伺服器控制屬性 (Property) 的字串,用於變更快取中的使用者控制項。

varyByCustom
String

使用者定義的字串,其中包含自訂輸出快取參數值。

sqlDependency
String

以分號分隔的字串,可指定要針對 Microsoft SQL Server 快取相依性使用的資料庫與資料表。

buildMethod
BuildMethod

委派,會呼叫建置控制項的方法。

providerName
String

用來儲存輸出快取控制項的提供者名稱。

適用於