I want to show alert message in global.asax on application_Error event

Posted by Suraj1.Niit under ASP.NET on 1/28/2014 | Points: 10 | Views : 3966 | Status : [Member] | Replies : 1
I need to show alert message when any error occured in application from Application_Error event using javascript. I performing the following code:

Page p = new Page();
p.ClientScript.RegisterClientScriptBlock(this.GetType(), "Error", "javascript:alert('There is an error!')", true);

But it wasn't work for me. pls provide a solution on this.


Posted by: Prabhukiran345 on: 1/28/2014 [Member] Starter | Points: 25

There is no easy way to do this, so just develop a new error page for these types of errors, and Redirect to that page when that specific error is caught in the Application_Error event.Hope this may help you.


Prabhu Kiran B

Prabhu Kiran Bommareddy

Suraj1.Niit, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response