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

OnValidating override question

1 view
Skip to first unread message

proxyuser

unread,
Jan 4, 2010, 9:52:01 AM1/4/10
to
Let's say I subclass a control such as TextBox, and I override OnValidating.
The first thing I should do, I think, is call base.OnValidating. Then, I
should check if the base has cancelled? Then, what if I am subclassed? In
other words, when the subclass calls me. Looking for a general strategy for
handling this type of event.

public override void OnValidating(CancelEventArgs e)
{
if (e.Cancel) ?? // subclass has already canceled?

base.OnValidating(e);

if (e.Cancel) ??
}


0 new messages