custom errors definitions

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
 
H

Harshdeep Mehta

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


Members online

No members online now.

Forum statistics

Threads
474,264
Messages
2,571,065
Members
48,770
Latest member
ElysaD

Latest Threads

Top