1.首先创建一个xxx.aspx页面;
2.【前端】写一个JavaScript脚本;
<script type="text/javascript"> //在前端JS中写一个方法 function alertTest() { alert("我被调用了!"); } </script>
3.【后端】进行调用;
this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "test", "alertTest()", true);