AspxErrorPath in Custom Error Page

前端 未结 3 1365
执笔经年
执笔经年 2021-01-12 00:30

We currently has a page that is used to display a generic error message when errors occur on our website. It has no functionality at all other than displaying a label that m

3条回答
  •  渐次进展
    2021-01-12 00:47

    you could catch/handle all errors in your global.asax file instead and do the redirect there

        protected void Application_Error(object sender, EventArgs e)
        {
            //Exception ex = Server.GetLastError();
    
            Server.Transfer("~/DefaultErrorPage.aspx");
        }
    

提交回复
热议问题