方案一
((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>");
后台代码弹出对话框的几种方式
原文:http://www.cnblogs.com/zhourourou/p/5210611.html