在程序里加debug和release两种方式

来源:互联网 发布:机构交易软件 编辑:程序博客网 时间:2024/04/28 15:56

在配制节里加个debug的节,在页面重写 protected   override void  OnError(System.EventArgs   e)   ,在错误处理前判断这个配制节.

globa 里面的方法
protected void Application_Error(Object sender, EventArgs e)
  {
   string error=Server.GetLastError().InnerException.Message;
   if   (Context   !=   null )  
    Server.Transfer("WebForm2.aspx?error="+error,   false);
  }

原创粉丝点击