MobileControl.IsFormSubmitControl 方法

定义

如果该控件提交窗体,则返回 trueReturns true if the control submits the form. 默认值为 falseThe default is false. 此 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.

protected:
 virtual bool IsFormSubmitControl();
protected virtual bool IsFormSubmitControl ();
abstract member IsFormSubmitControl : unit -> bool
override this.IsFormSubmitControl : unit -> bool
Protected Overridable Function IsFormSubmitControl () As Boolean

返回

如果控件提交窗体,则为 true,否则为 falsetrue if the control submits the form; otherwise, false.

注解

移动控件(如 Command)可以重写此方法,以确定它是否是用于提交窗体的控件。Mobile controls, such as the Command, can override this method to determine whether this is a control used for form submission.

可以通过提供逻辑以编程方式确定是否必须 submit 控件,例如通过检查特定属性,来扩展其他控件。Other controls can be extended by providing logic to programmatically determine whether or not they must be submit controls, for example, by checking for specific properties.

备注

仅当控件实现 IPostBackEventHandler 方法来捕获回发事件时,才会将控件视为窗体提交控件。A control is considered to be a form-submit control only if it implements IPostBackEventHandler method to capture the postback event. 否则,即使方法返回 true,也不会为默认事件处理程序注册。Otherwise, it is not registered for the default event handler, even if the method returns true.

适用于

另请参阅