开发者

calling javascript from ASP.NET when using ajax extention

开发者 https://www.devze.com 2023-03-27 07:15 出处:网络
Well I am using Visual Studio 2010, If I am not using Ajax extention i.e. if I am not using ScriptManager and UpdatePanel

Well I am using Visual Studio 2010,

If I am not using Ajax extention i.e. if I am not using ScriptManager and UpdatePanel then it is simple task to call a JavaScript function from C# code behind event of any control using "ClientScript.RegisterStartupScript"

But what should be done if my C# code开发者_StackOverflow社区 is behind a control inside UpdatePanel and we are using ScriptManager to use Ajax

?!! please advice


On the button's onclick event:

ScriptManager.RegisterStartupScript(this, this.GetType(), "alertJsTest", "alert('test!');", true);
0

精彩评论

暂无评论...
验证码 换一张
取 消