How do I force full post-back from a button within an UpdatePanel?

前端 未结 5 1856
南方客
南方客 2020-12-02 16:28

How do I force full post-back from a button within an UpdatePanel?

5条回答
  •  情深已故
    2020-12-02 17:07

    Just adding this because nobody else has. It is possible to do this in code-behind in one line of code without any of the above methods. Just put this in page_load:

    Visual Basic

    ScriptManager.GetCurrent(Me).RegisterPostBackControl(myButtonID)
    

    C#

    ScriptManager.GetCurrent(this).RegisterPostBackControl(myButtonID);
    

提交回复
热议问题