Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to handle errors in server code

Reply
Thread Tools

How to handle errors in server code

 
 
=?Utf-8?B?UmljaGFyZA==?=
Guest
Posts: n/a
 
      08-06-2007
Hi,

In my ASP.NET 2 page, there's Javascript code that uses XMLHttpRequest class
to execute code (which access the database) on the server, and sends data
back to populate controls on the page.

How should errors be handled in the server code, for example when a database
error occurrs?

Thanks in advance,

Rick

 
Reply With Quote
 
 
 
 
Mike
Guest
Posts: n/a
 
      08-07-2007
Use a try{} catch{} in your methods. The catch{} will get trap your errors
and you can write them out to a log file, to the page, a db table, etc, if
you want as well.







"Richard" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> In my ASP.NET 2 page, there's Javascript code that uses XMLHttpRequest
> class
> to execute code (which access the database) on the server, and sends data
> back to populate controls on the page.
>
> How should errors be handled in the server code, for example when a
> database
> error occurrs?
>
> Thanks in advance,
>
> Rick
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Possible to handle web requests without an ASPX page? i.e. have DLL handle request. jdlwright@shaw.ca ASP .Net 2 05-31-2005 05:42 PM
how to handle command line output(not terminal handle) Leon Python 2 11-04-2004 05:16 AM
File Handle Reading Blues: Rereading a File Handle for Input Dietrich Perl 1 07-22-2004 10:02 AM
Errors, errors, errors Mark Goldin ASP .Net 2 01-17-2004 08:05 PM



Advertisments