ASP.NET/JavaScript: How to surround an auto generated JavaScript block with try/catch statement

Posted by Rami Shareef on Stack Overflow See other posts from Stack Overflow or by Rami Shareef
Published on 2011-01-17T07:43:56Z Indexed on 2011/01/17 7:53 UTC
Read the original article Hit count: 325

Filed under:
|
|
|

In the Script documents that asp.net automatically generates how can I surround the whole generated scripts with try/catch statement to avoid 'Microsoft JScript Compilation error'

My issue is: i got a DevExpress control (ASPxGridView) that added and set-up in run time, since i activated the grouping functionality in the grid I still get JS error says ';' expected whenever i use (click) on one of grouping/sorting abilities, I activated script Debugging for IE, in the JS code turns out that there is no missing ';' and once i click ignore for the error msg that VS generates every thing works fine, and surly end-user can't see this msg so i figured out if i try/catch the script that may help avoid this error.

Thanks in advance

© Stack Overflow or respective owner

Related posts about c#

Related posts about JavaScript