Need help with a custom error page that shows the error message details

I know how to alter the web config to redirect to an errors page but what I need to do is have the actual offending error message print to that page. This is a special request for testing reasons, I realize the whole point of a custom error page is to provide a user friendly message when an error occurs but for testing we want to show the user the message so they can copy and paste it into a ticketing system we are using for beta testing feedback.

Should I use the global.asax instead? I am pretty new to vb.net and am not sure how to get the actual error message to display on my custom error page. Any guidance would be greatly appreciated.

Thanks

hi here are these steps : – get your error  details using Code in Application_Error event (global.asax )- save these details  in text files (for example ) .- read this file in every error page  which will be displayed by user  . (already decaled in custom  error section ). Hope this helps

Have a temporary ShowError.aspx page  and redirect  to the ShowError page after clearing the error  from the application error method.Applicatoin Error Method:Snippetprotected void Application_Error(object sender, EventArgs e){    HttpContext.Current.Session[“Error”] = HttpContext.Current.Error;    HttpContext.Current.ClearError();    Response.Redirect(“ShowError.aspx”);}ShowError.aspx:Snippet<%@ Page Language="C#" %>                protected override void OnLoad(EventArgs e)        {            base.OnLoad(e);            if (Session[“Error”] != null)                this.txtError.Value = ((Exception)Session[“Error”]).ToString();        }                Problem is:                    

Thank you Charith, this looks like the way to go.C.J.