0

I have build ASP.NET Project but worried to have issue in javascript. How to disable error script in ASP.NET, 'Script Error' pop up that javascript error or issue like this example.

er.jpg

I have been disable 'debug mode=false' in the webconfig and then disable compile warning in Visual Studio before published, or disable debug in IE, but is nothing. What ever the error script, Any code (C#/VB.net) for prevent this message?

Note : I must using IE Browser.

Thank you,

MFBCTRC
  • 83
  • 1
  • 1
  • 4
  • 1
    Don't you think it'd be better to fix the error instead of hiding it? – Jan Köhler Sep 18 '16 at 05:15
  • I believe in this case, I have priority to hiding it while resolve the issue. Also, I worried if sometimes "error script" pop up is occured in another issue script. – MFBCTRC Sep 18 '16 at 05:19
  • Come on, have a look at [this question](http://stackoverflow.com/questions/28293960/datetimepicker-component-not-in-right-place). The should be easily fixable. – Jan Köhler Sep 18 '16 at 05:23
  • Okay assumed this case is solved like example above. But there a way to prevent the script pop up message, I worried if another script error occured because I must use Internet Explorer, you know IE has many compability issue especially Old IE (10). – MFBCTRC Sep 18 '16 at 06:08

1 Answers1

0

I suggest wrapping the problematic javascript code in a try {} catch {} block. Then you can deal with the error instead of making a pop up.

user230910
  • 2,353
  • 2
  • 28
  • 50