MobileControl.Form 属性

定义

提供对包含窗体的访问。Provides access to the containing form. 此 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:
 property System::Web::UI::MobileControls::Form ^ Form { System::Web::UI::MobileControls::Form ^ get(); };
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public System.Web.UI.MobileControls.Form Form { get; }
member this.Form : System.Web.UI.MobileControls.Form
Public ReadOnly Property Form As Form

属性值

包含此控件的窗体。The form that contains this control.

属性

异常

该控件不在所需的窗体中。the control is not in a form as required. 唯一不需要位于 Form 中的移动控件为 FormStyleSheetThe only mobile controls not required to be in a Form are a Form and a StyleSheet.

示例

下面的示例演示如何使用 Form 属性来确定活动窗体是否为 ASP.NET 移动 Web 应用程序中的特定窗体。The following example demonstrates how to use the Form property to determine whether the active form is a particular form in the ASP.NET mobile Web application. 此示例是 EnsureTemplatedUI 属性的更大示例的一部分。This example is part of a larger example for the EnsureTemplatedUI property.

适用于

另请参阅