How to call a client side javascript function after a specific UpdatePanel has been loaded

后端 未结 3 579
囚心锁ツ
囚心锁ツ 2020-12-07 15:18

How is it possible to call a client side javascript method after a specific update panel has been loaded?

Sys.WebForms.PageRequestManager.ge

3条回答
  •  [愿得一人]
    2020-12-07 15:32

    This may be your solution.

    In the code behind for the UpdatePanel's OnLoad event, register a startup script.

    string scriptText = "alert('Bar!');";
    
    ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "foo", scriptText, true);
    

提交回复
热议问题