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 : 4457 | 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.




Responses

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

Up
0
Down
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.

http://stackoverflow.com/questions/2622366/show-alert-message-box-from-the-global-asax-on-application-error-event

Regards,
Prabhu Kiran B

Thanks,
Prabhu Kiran Bommareddy

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

Login to post response