2738A Custom ASP Error Class with Pop-up Dialog Boxhttp://www.asp101.com/articles/matt/asperrordialogbox/default.aspThe error class, CError, allows you to display a custom dialog box with the option to have a detailed message, a general message, and log the error in a file for later reference. It also uses some JavaScript and DHTML to allow the user to drag the dialog box around. But since this article is more about the Error Handling that will not be discussed.ASP > Tips and Tutorials > Error HandlingOct 10, 2006
Did I tell you I love the new ASP Error object? It finally enables developers to control page execution. This object is used to retrieve details of the last error that occurred within an ASP page. Combine that with the ability to create custom error pages, and you have a pretty powerful tool within the development shack.
The basic 404 error or file not found page serves two specific purposes. Firstly, to alert the user that the item they were expecting is not currently available, rather than the generic page your host may provide or worse the generic windows file not found page. Secondly, to alert the webmaster that a file is missing or a link is targeting something incorrectly. In order to provide users with a page that will show up whenever a 404 error occurs you need to change the settings on your web server to target a specific page or contact your hosting company to do this for you. Once setup, the location of any file that is requested and not found on the server will be made available as a query string value and can be outputted to a database to track where and when the erros are occuring. A demonstration of the CodeAve.com 404 error page can be seen by clicking here. (Some examples of other 404 error pages: Yahoo!, Excite, Disney, NBC, Bloomberg)
Problems and coding syntax mistales can been in every serverside application. Security of application is very important. You should need to understand what's going wrong in deep of an apllication. This sample of code is an easy to use an error handling message writer. .
The error class, CError, allows you to display a custom dialog box with the option to have a detailed message, a general message, and log the error in a file for later reference. It also uses some JavaScript and DHTML to allow the user to drag the dialog box around. But since this article is more about the Error Handling that will not be discussed.
Unexpected errors can stop programs and your application coul be down immadiately. But 'On Error Resume Next' funtcion help you to avoid to stop unexpected errors on code. All you need to put this code after a code block.
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.