如何中断整个后台程序的运行。

来源:互联网 发布:信捷plc编程实例 编辑:程序博客网 时间:2024/04/30 09:15
抛出一个异常,Throw New System.Exception(strMsg)
在Global.asax.vb中的Application_Error中添加Server.ClearError()清除异常,
然后用
System.Web.HttpContext.Current.Response.Write("<script language='javascript'>alert('" & objErr.Message.ToString & "');</script>")
System.Web.HttpContext.Current.Response.Write("<script language='javascript'>history.go(-1);</script>")
实现提示,并返回上一页

这是今天研究在类中添加断言时找到的方法。
原创粉丝点击