MobileControl.EnsureTemplatedUI 方法

定义

使用此方法可以确保已对模板进行了实例化,以允许对模板的实例化内容进行编程访问。Use this method to ensure that the templates are instantiated to allow programmatic access to the instantiated contents of a template. 此 API 已废弃不用。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

public:
 virtual void EnsureTemplatedUI();
public virtual void EnsureTemplatedUI ();
abstract member EnsureTemplatedUI : unit -> unit
override this.EnsureTemplatedUI : unit -> unit
Public Overridable Sub EnsureTemplatedUI ()

示例

下面的示例演示如何使用 EnsureTemplatedUI 方法来访问 ObjectList详细信息视图中 Label1 控件的内容。The following example demonstrates how to use the EnsureTemplatedUI method to access the contents of the Label1 control within details view of the ObjectList. 此完整示例还演示了 MobileControl 类的几个其他功能。This complete example also demonstrates several other features of the MobileControl class.

备注

下面的代码示例使用单文件代码模型,如果直接复制到代码隐藏文件中,则可能无法正常工作。The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. 必须将此代码示例复制到扩展名为 .aspx 的空文本文件中。This code sample must be copied into an empty text file that has an .aspx extension. 有关 ASP.NET 网页代码模型的详细信息,请参阅ASP.NET Web 窗体页代码模型For more information on the ASP.NET Web page code model, see ASP.NET Web Forms Page Code Model.

注解

此方法由 ListObjectList 类重写。This method is overridden by the List and ObjectList classes.

public override void EnsureTemplatedUI()  

适用于

另请参阅