后台代码弹出对话框的几种方式

方案一

((LinkButton)e.Row.Cells[2].Controls[0]).Attributes.Add("onclick""javascript:return confirm('确认要删除信息主题:\"" + e.Row.Cells[1].Text + "\"吗?')"); 
btnDelete.Attributes.Add("onclick""Javascript:return window.confirm('Sure you want to delete?')"); 
方案二
 ClientScript.RegisterStartupScript(Page.GetType(), """<script>rdoCk('rdoWhere" + Request["num"] + "');alert('Update Successful!');</script>");
方案三
Response.Write("<script>alert('hhhh')</script>");  

posted on 2016-02-23 17:17  周肉肉  阅读(1594)  评论(0编辑  收藏  举报

导航