StaticPartialCachingControl.BuildCachedControl 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在用户控件(.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
查询字符串或表单 POST 参数的字符串,用于更改缓存中的服务器控件。
- varyByControls
- String
列出服务器控件属性的字符串,用于更改缓存中的用户控件。
- 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
查询字符串或表单 POST 参数的字符串,用于更改缓存中的服务器控件。
- varyByControls
- String
列出服务器控件属性的字符串,用于更改缓存中的用户控件。
- 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 分配给控件的 ID。
- guid
- String
缓存控件的全局唯一标识符(GUID)。
- duration
- Int32
缓存控件输出的时间长度。
- varyByParams
- String
查询字符串或表单 POST 参数的字符串,用于更改缓存中的用户控件。
- varyByControls
- String
列出服务器控件属性的字符串,用于更改缓存中的用户控件。
- varyByCustom
- String
包含自定义输出缓存参数值的用户定义的字符串。
- sqlDependency
- String
一个以分号分隔的字符串,用于指定要用于Microsoft SQL Server缓存依赖项的数据库和表。
- buildMethod
- BuildMethod
调用生成控件的方法的委托。
- providerName
- String
用于存储输出缓存控件的提供程序的名称。