Web Controls namespace contains classes that allow you to create Web server controls on a Web page. Because Web server controls run on the server, you can programmatically control these elements. The namespace also contains classes that are not rendered on the Web page, but support data operations, such as the Sql Data Source and Object Data Source classes. Serves as the abstract base class for button fields, such as the Button Field or Command Field class. I hope someone may have some insight to this issue...I would like to know how to properly implement exception handling using the Object Data Source control.We’ll start with binding data to the Grid View, then build up functionality from there.First, we’ll implement a method to databind the Grid View, which will be called whenever databinding needs to be performed.The Grid View does know the events that should be used to implement them, so the exceptions shown above are thrown when you try to perform one of these operations, but you have implemented the appropriate event handler.
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. Net Grid View control with simple Data Set or Data Table, and also explains the methods like Insert, Edit, Update and Delete function in the Grid View control.You can see most of the articles and tutorials in many websites teach you the way to bind a Grid View control to the database with some Data Source controls such as SQLData Source, Object Data Source, Access Data Source and even XMLDatasource.So, I simply want to raise a custom exception ("Not Unique Exception").All this works great, however, I can't for the life of me figure out where to catch this exception.