|
|
|
start date: Mon, 6 Aug 2007 13:10:01 -0700,
posted on: microsoft.public.dotnet.framework.aspnet
back
| Thread Index |
|
1
Richard
|
|
2
Mike
|
How to handle errors in server code
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
Date:Mon, 6 Aug 2007 13:10:01 -0700
Author:
|
Re: How to handle errors in server code
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" wrote in message
news:54CE99E8-A84F-4CE6-BB30-55EF5B8ED517@microsoft.com...
> 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
>
Date:Tue, 7 Aug 2007 09:59:39 -0400
Author:
|
|
|