custom errors definitions

  • Thread starter Thread starter Ollie
  • Start date Start date
O

Ollie

If I define a custom error definition in the web.config for an asp.net web
site, e.g.

<customErrors mode="On" defaultRedirect="Error.aspx"/>

If an exception in the code causes the error.aspx page to be displayed, is
it possible to get that exception from the Page_Load of the error.aspx page?

Cheers in Advance

Ollie
 
Hi,

you can write Session variable in Global.asax file and get that session in
customerror page.

event in global.asax file is
protected void Application_Error(Object sender, EventArgs e)

{

}

I hope this will help you,

Harshdeep Mehta
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

customErrors 1
CustomError Problem 4
HTTP Error 404 1
CustomErrors not working on live host 1
<customErrors 3
Frustrations with Error Logging 1
Custom error form in asp.net web app 2
Error Handling 2

Back
Top