ScriptManager.RegisterPostBackControl(Control) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將控制項註冊為回傳的觸發程序。 可使用此方法來為另外執行非同步回傳的 UpdatePanel 控制項設定其內部的回傳控制項。
public:
virtual void RegisterPostBackControl(System::Web::UI::Control ^ control);
public void RegisterPostBackControl (System.Web.UI.Control control);
abstract member RegisterPostBackControl : System.Web.UI.Control -> unit
override this.RegisterPostBackControl : System.Web.UI.Control -> unit
Public Sub RegisterPostBackControl (control As Control)
參數
- control
- Control
要註冊用於回傳的控制項。
備註
RegisterPostBackControl使用 方法,將控制項內的 UpdatePanel 回傳控制項註冊為觸發程式。 使用此方法註冊的控制項會更新整個頁面,而不是只 UpdatePanel 更新控制項的內容。 使用控制項外部 UpdatePanel 的這個方法註冊回傳控制項並不會影響,因為這些控制項預設不會執行非同步回傳。
您可以使用 控制項的 UpdatePanel 元素,以宣告方式 Triggers
新增觸發程式。 在 Visual Studio 中,使用設計工具的 UpdatePanelTrigger 集合編輯器 對話方塊。