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
http://support.microsoft.com/default.aspx?scid=kb;en-us;306355
但是更好使用 httpcontext.items.add(错误信息)
效率要比session高 而且访问完后就会释放内存
Trycatch
err= ex.tostring()
//跳转另一页面 把参数传过去
End Try