1.ClientScript.RegisterStartupScript(GetType(),"message","<script>alert('第一种方式,无白屏!');</script>");
2.HttpContext.Current.Response.Write("<script>alert('第二种方式,有白屏!')</script>");
3.public static void Show(System.Web.UI.Page page, string msg)
{
page.ClientScript.RegisterStartupScript(page.GetType(), "message", "<script language='javascript' defer>alert('" + msg.ToString() + "');</script>");
}
Show(this, "第三种方式,无白屏!");
4.Response.Write("<script>alert('第四种方式,有白屏!')</script>");
5.window.showModalDialog('XXX.aspx', '', 'dialogWidth:429px;dialogHeight:200px;location:no,menubar:no,toolbar:no,status:no');
参考:http://www.cnblogs.com/technet/articles/1691839.html