MobileControl.ResolveFormReference(String) 方法

定义

返回名称参数引用的窗体对象。Returns the form object referenced by the name parameter. 此 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:
 System::Web::UI::MobileControls::Form ^ ResolveFormReference(System::String ^ formID);
public System.Web.UI.MobileControls.Form ResolveFormReference (string formID);
member this.ResolveFormReference : string -> System.Web.UI.MobileControls.Form
Public Function ResolveFormReference (formID As String) As Form

参数

formID
String

窗体对象Form object

返回

名称参数引用的窗体。The form referenced by the name parameter.

例外

formID 不引用现有 FormformID does not refer to an existing Form.

注解

如果用户控件中包含的控件中有 "#form1" 格式的链接,则此方法将查找用户控件中具有 id=form1 的窗体。If you have a link of the format "#form1" in a control contained in a user control, this method looks for a form with id=form1 in the user control. 如果找不到,它将向上定位任何嵌套用户控件,然后在页面上搜索窗体。If not found, it goes up the chain of any nested user controls, and then searches for the form on the page.

备注

范围规则将向上(而不是关闭)链。Scoping rules walk up, not down, the chain. 如果要浏览到用户控件中包含的窗体,则必须使用 FindControl 方法使用的 ":" 语法来引用窗体。If you want to browse to a form that is contained in a user control, you must use the ":" syntax used by FindControl method to refer to the form.

适用于

另请参阅