Asp.net AJAX调用后台注册脚本代码

来源:互联网 发布:手机红外线水平仪软件 编辑:程序博客网 时间:2024/04/29 09:21

使用asp.net自带的ajax控件,想要调用后台的脚本代码,最先开始用

ClientScript.RegisterStartupScript(this.GetType(), "clear", "<script>alert('更改失败。');</script>");

一直执行不成功,后来改用

ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "msg2", "alert('更改失败。'); ", true);

可正常执行。

0 0
原创粉丝点击