Link to home
Start Free TrialLog in
Avatar of LloydMc
LloydMc

asked on

How to display an popup error message from the global.asax file

Hello all,

I'm handling unexpected exceptions in the Global.asax's Application_Error event.  The current code in the Application_Error event gathers the exception info and notifies the dev staff, then redirects the user to an friendly error page with a link to the application's home page. The issue I'm having is that there is a process which opens a page in a new window where additional processing occurs.  If an exception occurs in the new window, the home page redirection, of course, takes place from that point. What I would like to do is open the error page in a separate window via jscript, but this doesn't seem possible from global asax.  Any suggestions would be appreciated.
Avatar of Hamed Zaghaghi
Hamed Zaghaghi
Flag of Iran, Islamic Republic of image

use alert java script function
Avatar of LloydMc
LloydMc

ASKER

Zaghaghi,

How would I do this? I can't inject any script from global.asax since I don't have access to the response object.
when you cath the errors in global.asax you can redirect to a page that shows error(s)

why do you need to display an popup error?
Avatar of LloydMc

ASKER

Zaghaghi,

As I explained above, there is a process that executes in a page that was opened in a separate window, so if an exception occurs in that window, any navigation will occur in that window's space, leaving the previous window open in the background. Also, I don't want to navigate away from the current page.
ASKER CERTIFIED SOLUTION
Avatar of vinodhsomasekharan
vinodhsomasekharan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial