0

I know we can capture ScriptManager errors via EndRequest event to display as an alert, for example.

Example code to handle error:

var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(EndRequest);
function EndRequest(sender, args)
{
    if (args.get_error())
    alert(args.get_error());
}

This error is also displayed on console by default. But, is there a way to actually prevent these errors from appearing on the console? I don't want user to see what the error is, anywhere.

In ASP .Net, you can suppress errors/exceptions from showing up to user on the browser. The errors I am seeing on console when using UpdatePanel are these asp .net errors. Similarly, is it possible that these errors could suppressed from console?

  • you may want to clear the console http://stackoverflow.com/questions/3011600/clear-javascript-console-in-google-chrome – writeToBhuwan Sep 19 '13 at 10:43
  • @writeToBhuwan, I would want the message to not appear at all. Ideally, I wouldn't want to clear it after it's already displayed. – Nostradamus Sep 19 '13 at 21:35

0 Answers0