我如何把所有的错误都集中到一个页面,并且在这个页面显示错误的详细信息?
出现错误是导到一个错误页面很容易实现,但我不知道,怎么把详细信息在这个页面显示出来,那位高手帮忙,解决了就结贴!!!

解决方案 »

  1.   

    catch the error, save the error message somewhere, like in a session variable, then redirect to the error pageaslo, seeHOW TO: Create Custom Error Reporting Pages in ASP.NET by Using Visual C# .NET
    http://support.microsoft.com/default.aspx?scid=kb;en-us;306355
      

  2.   

    思归的session肯定没有问题
    但是更好使用 httpcontext.items.add(错误信息)
    效率要比session高 而且访问完后就会释放内存
      

  3.   

    dim err as string
    Trycatch 
    err= ex.tostring()
     //跳转另一页面 把参数传过去
    End Try