在网页中怎么捕捉错误信息?即:怎样替代以下代码?
 catch (FormatException fEx)
        {
            string message = fEx.Message;
            MessageBox.Show(message);
        }

解决方案 »

  1.   

    catch (FormatException fEx) 
            { 
                string message = fEx.Message; 
                Response.Write(message);
            }
      

  2.   

    catch(FormatException fEx)
    {
       Response.write("<script>alert('"+fEx.Message+"')</script>");
    }
      

  3.   

    catch (FormatException fEx) 
            { 
                string message = fEx.Message; 
                Response.Write("<script>alert('" + message.Replace("\r\n","") + "');</script>");
            }
      

  4.   

    try catch 
    无法解决ORA-01400: 无法将 NULL 插入