asp.net前后台的弹窗方法

来源:互联网 发布:常见端口列表 编辑:程序博客网 时间:2024/06/06 20:53

【前台aspx】

1.alert(“我弹了出来~~”);

【后台cs】

1.aspx页面添加一个label服务端控件

这里写图片描述
cs后面调用显示并设置label的脚本
这里写图片描述

2.Context.Response.Write

Context.Response.Write("<script>alert('我弹窗啦!');</script>");

3.RegisterStartupScript

this.RegisterStartupScript("hello", "<script>alert('你好!')</script>"); 
原创粉丝点击