N
nunya5200-bidness
I hope someone may have some insight to this issue...
I would like to know how to properly implement exception handling using
the ObjectDataSource control.
Specfically, I am doing an insert using an object that calls a web
service to accomplish this. The service returns a message to the
Insert method that indicates that the insert can't be accomplished
because it is trying to insert a duplicate key value. So, I simply
want to raise a custom exception ("NotUniqueException"). All this
works great, however, I can't for the life of me figure out where to
catch this exception.
The ObjectDataSource Control Inserting event takes place before the
method is called and the Inserted event after the fact. The button on
the FormView has a command of "Insert" so the insert method is "just
called from somewhere"...
Any ideas?
Thanks.
charlie
I would like to know how to properly implement exception handling using
the ObjectDataSource control.
Specfically, I am doing an insert using an object that calls a web
service to accomplish this. The service returns a message to the
Insert method that indicates that the insert can't be accomplished
because it is trying to insert a duplicate key value. So, I simply
want to raise a custom exception ("NotUniqueException"). All this
works great, however, I can't for the life of me figure out where to
catch this exception.
The ObjectDataSource Control Inserting event takes place before the
method is called and the Inserted event after the fact. The button on
the FormView has a command of "Insert" so the insert method is "just
called from somewhere"...
Any ideas?
Thanks.
charlie