Reputation: 1158
In my solution i have a folder FIRE in which i have a page.I am using respose.redirect to handle my error to another page Error.aspx. I am writing
catch (System.Exception ex)
{
//DisplayError(ex);
Session["ExceptionDetails"] = ex;
Response.Redirect("ErrorInformationDetails.aspx");
}
but getting error
resource not found /FIRE/ERROR.aspx not found.
but for other pages which are in main directory its working fine
Upvotes: 0
Views: 3944
Reputation: 4489
Try This code.This Can reduce a RoundTrip Process of Web Request if cursor goes to Exception Block.
Response.RedirectPermanent("~/Administration/Masters/SearchThought.aspx");
Upvotes: 1
Reputation: 94643
Always use root operator (~) to avoid such errors:
Response.Redirect("~/Fire/Error.appx");
Upvotes: 2