2013-05-03 28 views
0

在我的解決方案中,我有一個文件夾FIRE,其中我有一個page.I使用respose.redirect來處理我的錯誤到另一個頁面Error.aspx。 我寫Response.Redirect來自Web解決方案文件夾內的頁面?

catch (System.Exception ex) 
{ 
    //DisplayError(ex); 
    Session["ExceptionDetails"] = ex; 
    Response.Redirect("ErrorInformationDetails.aspx"); 
} 

但得到錯誤未找到

資源/FIRE/ERROR.aspx沒有找到。

但是這是在主目錄中的其他頁面的工作正常

+0

使用false與Response.Redirect(「ErrorInformationDetails.aspx,false」); – Rahul 2013-05-03 10:05:02

回答

2

總是使用根操作符(〜),以避免這樣的錯誤:

Response.Redirect("~/Fire/Error.appx"); 
2

試試這個

Response.Redirect("~/Fire/Error.aspx"); 
1

嘗試此代碼。如果光標移至「異常塊」,則可以減少Web請求的RoundTrip進程。

Response.RedirectPermanent("~/Administration/Masters/SearchThought.aspx"); 
相關問題