D
Dave Wurtz
All,
Not sure if I'm taking the correct approach or not, but here it is...
I have my business object with a property. I want to validate the Setting
of this property with the business object. This works fine. I then create
a Form, put a TextBox control on it, add a DataBinding to the control to the
business object's property. When the control is displayed, it sets the text
to the property's get - perfect. When I type something in the textbox and
tab off of it, it calls the Set part of the property, which validates the
value and throws an exception. Where does this exception go? It doesn't
seem to go anywhere - as if the internal .net code has a try...catch, but is
not doing anything with the exception.
Is this even the correct approach for control validation? I have to have
the validation in the business object and I don't want to have to re-write
it again in the GUI.
Any help is appreciated!
Dave
Not sure if I'm taking the correct approach or not, but here it is...
I have my business object with a property. I want to validate the Setting
of this property with the business object. This works fine. I then create
a Form, put a TextBox control on it, add a DataBinding to the control to the
business object's property. When the control is displayed, it sets the text
to the property's get - perfect. When I type something in the textbox and
tab off of it, it calls the Set part of the property, which validates the
value and throws an exception. Where does this exception go? It doesn't
seem to go anywhere - as if the internal .net code has a try...catch, but is
not doing anything with the exception.
Is this even the correct approach for control validation? I have to have
the validation in the business object and I don't want to have to re-write
it again in the GUI.
Any help is appreciated!
Dave