Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Design assistance
Message
From
02/12/2005 09:22:33
Keith Payne
Technical Marketing Solutions
Florida, United States
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01074006
Message ID:
01074191
Views:
20
>I am not sure if I am approaching this the wrong way or if I am just making things a lot more difficult.
>
>Here is the scenario. I have a custom user control on my form. The user control raises an event, the form executes the method specified. the method makes a connection to a database and tries to update a row in a table. Now lets assume something went wrong (yes it might happen) and the record could not be updated. What is the reccomended (best practive) to convey that information back to the usercontrol?

The best-practice method for "black-box" controls is to catch the error within the control, clean up any connections, readers, etc., and then throw a new exception. The new exception should be a custom type that is defined within the library that contains the control.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform