当用try{} catch()导出csv文件时

如果catch中用Exceptions.ProcessModuleLoadException(this, ex);

时将会把所有静态html内容导出来,这时应该去掉Exceptions.ProcessModuleLoadException(this, ex);换为

 

 

pnl_Message.Visible = true;

                    lbl_Error.Visible = true;

                    lbl_Success.Visible = false;

这样抛出错误就可以了