> What I want to know is, does this mean that my error handling on the ASP
> page is effectivley done on another thread?
Events are asynchronous, yes.
> Are there any risks in doing it this way?
Multi-threading does involve risk. Events are probably less risky in
general, but as the event handlers fire asynchronously, you do have to be
responsible for what they do, avoid race conditions, deadlocks, that sort of
thing. for example, if the event handler attempts to modify a field or
property in the class, you may want to use locking. Also, be aware that the
event handler fires out of sequence, and could fire at any time, and account
for it in your code.

Signature
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
The sun never sets on
the Kingdom of Heaven
> Hi
>
[quoted text clipped - 14 lines]
> ---
> Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/
Brock Allen - 20 Jul 2005 14:39 GMT
>> What I want to know is, does this mean that my error handling on the
>> ASP page is effectivley done on another thread?
>>
> Events are asynchronous, yes.
I think this is a bit misleading. The Page_Error is called on the same thread
that executes the page. Once the page encounters an exception it first looks
for a Page_Error handler on that page and calls it synchronously (from the
same thread). It then will look for an Application_Error (from global.asax)
and then call that. It is asynchronous in the sense that you don't know when
you'll have an exception, but there is no thread switch.
-Brock
DevelopMentor
http://staff.develop.com/ballen
michaeltorus - 20 Jul 2005 14:42 GMT
Is this still the same when my objects raises the Event?
Kevin Spencer - 20 Jul 2005 16:01 GMT
Is what still the same as what? If you're talking about Brock's mention of
Page_Error, no. In your case, it would be as I described it to you.

Signature
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
The sun never sets on
the Kingdom of Heaven
> Is this still the same when my objects raises the Event?
>
> ---
> Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/