如题,, 怎么跳转到程序根目录下的error.htm页面呢404

解决方案 »

  1.   

    Response.Redirect("error.htm");//注意路径
      

  2.   

    我在类里面写不了 Response.Redirect
      

  3.   

    我在类里面写不了 Response.Redirect那就在界面层,catch里面,再执行 Response.Redirect。
      

  4.   

    我在类里面写不了 Response.Redirect引用好命名空间:
    HttpContext.Current.Response.Redirect("error.htm");你这么搞不如配置个全局跳转…
      

  5.   

    删除你的try...catch。在你的page中可以直接捕获Error,或者(在global.asax中)直接捕获Application_Error事件。
      

  6.   

    在global.asax中)直接捕获Application_Error事件 , 这个比较好用, 谢谢啦,