O'Reilly logo

Active Server Pages 3.0 from Scratch by Nicholas Chase

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Error Handling

ASP provides you with several scripting objects that help with various tasks. One of them is the Err object, which helps you handle errors.

If you try to reload your page after you've already submitted it once, you get an error message. That message isn't very informative, however, and it's certainly not something we want our users to see. We can, however, handle this ourselves and avoid the error page.

You can handle the error with an On Error statement. What this means is that you tell ASP what to do if an error occurs. In VBScript, you don't have many error handling statements to choose from, but you can make do with On Error Resume Next. What this tells ASP is to keep going when it gets to an error. Add this to your page (see ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required