请大家说一下 server.ClearError 的用法 在什么情况下用,请大家举个实际用的例子 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我一般是在Global.asax文件中的 Application_Error 函数里使用,当系统出错了,就会执行Application_Error函数,我把错误写事务日志后,再清除错误 void Application_Error(object sender, EventArgs e) { Exception objErr = Server.GetLastError().GetBaseException(); string error = "错误页面" + Request.Url.ToString() + "<br><br>"; error += "错误信息:" + objErr.Message + "<br><br>"; Server.ClearError(); Application["PubError"] = error; this.Response.Redirect("ErrorMsg.aspx"); } 求助,FreeTextBox的字体大小问题,FreeTextBox高手请进 为什么我添加了加载java小程序的代码出不来效果啊? 求救!!如何得到模态窗体的返回值!!! 新手提问关于ASP.NET的问题? 请教ASP.NET2.0,DetailsView手写编辑,更新,取消操作? 关于windows身份验证中,用户角色的问题 如何返回多个值??????? 这样的如何取出来呢? 怎么在DataGrid中获取模板列中的RadioButtonList的值??? 查询数据的问题 asp.net+c#生成静态文件+单用户要随机 救命!字符串中截取字符串
{
Exception objErr = Server.GetLastError().GetBaseException();
string error = "错误页面" + Request.Url.ToString() + "<br><br>";
error += "错误信息:" + objErr.Message + "<br><br>";
Server.ClearError();
Application["PubError"] = error;
this.Response.Redirect("ErrorMsg.aspx"); }