MobileControl.IsFormSubmitControl 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
如果控制項會送出表單,則傳回 true
。 預設為 false
。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。
protected:
virtual bool IsFormSubmitControl();
C#
protected virtual bool IsFormSubmitControl();
abstract member IsFormSubmitControl : unit -> bool
override this.IsFormSubmitControl : unit -> bool
Protected Overridable Function IsFormSubmitControl () As Boolean
如果控制項送出表單則為 true
,否則為 false
。
行動控件,例如 Command,可以覆寫這個方法,以判斷這是用於表單提交的控件。
藉由提供邏輯以程式設計方式判斷它們是否必須是 submit
控件,例如,藉由檢查特定屬性,即可擴充其他控制件。
備註
只有當控件實 IPostBackEventHandler 作方法來擷取回傳事件時,控件才會被視為窗體提交控件。 否則,即使方法傳回 true
,也不會註冊預設事件處理程式。
產品 | 版本 |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |