C#弹出对话框实现

在Web网站中,使用System.Web.HttpContext.Current.Response.Write("<script>alert('异常:"+exp.Message+"');history.back();</script>");

或者Response.Write("<script>alert('异常:"+exp.Message+"');history.back();</script>");

在Win Form 应用程序中,则是使用MessageBox.Show(string text,string cation);来实现。

原文地址:https://www.cnblogs.com/wintergrass/p/1789010.html