How to call javascript function from c#

前端 未结 7 1544
盖世英雄少女心
盖世英雄少女心 2020-12-11 19:18

I like to call a JavaScript function from c#. Can any one can give me code snippet.

More detail...

I have a asp.net page which has a asp button. when i click

7条回答
  •  [愿得一人]
    2020-12-11 20:13

    you can call javascript function from code behind page ..for example you have closewindow function definition part in javasript..if you want to execute that function,you can write following codings in any click event in code behind page..

    ClientScript.RegisterClientScriptBlock(GetType(), "close", "", false);
    

提交回复
热议问题