捕捉到错误后怎么不出提示
catch (Exception ex)
{
Response.Write( " <script defer> window.alert( '导入失败! " + ex + " '); </script> ");
return;
}
[解决办法]
catch (Exception ex)
{
Response.Write( " <script> window.alert( '导入失败! " + ex.Message + " '); </script> ");
}
[解决办法]
string err = string.Format( " <script> alert( '{0} '); </script> ",ex.Message)//ex.Message可能需要处理 ' "字符。
response.Write(err);