how to stop the execution of code when error arises in asp.net
These can stop the execution of your page and leave the user with a lot of non-user-friendly text on the screen. 1  Compile-time errors. 2  These errors are usually in the syntax of the code and stop the ASP from compiling. 3  You may have experienced this if you left the closing Next statement off of a For loop.