Passing arguments to JavaScript function from code-behind

前端 未结 9 2046
孤街浪徒
孤街浪徒 2020-12-03 17:54

I would like to call a javascript function from an aspx control. For instance, suppose I had:


    

        
9条回答
  •  旧时难觅i
    2020-12-03 18:36

    Look at the ScriptManager.RegisterStartupScript method if you're using a ScriptManager or any Ajax controls/asynchronous postbacks.

    Edit:

    Actually, the function you want is probably ScriptManager.RegisterClientScriptBlock

提交回复
热议问题