后台调用前台JS方法

View Code
1 protected void btnhelp_Click(object sender, EventArgs e)
2 {
3 //在这里写上你的代码
4 Label1.Text = "测试";
5
6 //下面执行js代码
7 ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "openghelp", "openHelp()", true);
8 //其中true,表示可以不输入<script> </script>
9 }
posted @ 2012-03-03 13:37  志誠  阅读(269)  评论(0编辑  收藏  举报