Either in the Page_Error event or in the global exception event handler (my
personal preference)...
The general idea is that exceptions are propagated automatically to callers.
So the first step could be to check your first assumption. This is not
because the dropdown is not an object known from the parent page that
exceptions thrown there are not propagated back to the caller (it just uses
the call stack to pass the exception to calling code).
With this in mind the general principle would be to have a global error
handler at the highest possible level so that you knows that something goes
wrong and that you can fix the coding error. Then you can place a local
exception handler at choosen places :
- either because your code or the user could do something to solve the
particular exception you are trapping at this place (and in this case you
don't let this particular one to propagate higher)
- or to do some cleanup on unmanaged resources (but in this case you still
let the exception goes higher as once resources are released you still want
to know that your application has en error you should fix).
You should find more details areound :
http://msdn2.microsoft.com/en-us/library/6kzk0czb.aspx
--
Patrice
"Yash" <ya****@gmail.c oma écrit dans le message de news:
3b************* *************** **...legroup s.com...
But where will the try and catch be in the containg page to handle the
bubbled exception?
Raising an OnError event may work. But is there another way?