Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OnError in UserControls?

17 views
Skip to first unread message

Jesse Sweetland

unread,
May 16, 2003, 10:17:18 AM5/16/03
to
I've just discovered that OnError does not fire in any of my UserControls
(ASCX.cs). However, any exception fired in a UserControl is caught and
handled by the OnError event of the encompassing Page (ASPX.cs). Is this by
design? I would much rather catch the exceptions in the control itself; is
there any way to do that (other than structures try/catch)?


Victor Garcia Aprea [MVP]

unread,
May 18, 2003, 9:42:32 PM5/18/03
to
Hi Jesse,

I believe you wont get Error to fire in a usercontrol. In Page there is some
code that explicity calls Error when an exception goes unhandled.
UserControl doesnt have such code.

Let me know if you want more details,

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Read my blog at: http://dotnetweblogs.com/vga !!

"Jesse Sweetland" <jes...@point-five.net> wrote in message
news:vc9snfo...@corp.supernews.com...

0 new messages