Calling a javascript function from Page_Load in code-behind

后端 未结 8 1203
广开言路
广开言路 2021-01-25 03:49

How can I call a javascript function, that is in the aspx page, from the Page_Load method, in the code-behind?

8条回答
  •  一生所求
    2021-01-25 04:17

    Please try this code:

      ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "MyFun1", "test();", true);
    

提交回复
热议问题