![]() You can hook up to the Inserting event of the data-source control and add/set the insert parameters that should be used, but if the DataObjectTypeName is set to a type, the InvalidOperationException will be thrown because the argument passed to the The data-bound control that uses the Insert method will first get the ObjectDataSourceView and pass the value to be inserted directly to the Insert method of the If you make a call to the Insert method of the ObjectDataSource the value will always be null. Regardless of what I do, I still get the above exception. From what I can understand from the API documentation, the InputParameter names must match the property names of my object. I have tried setting the insert parameters declaratively, and also by manually adding them to the InsertParameters collection before I call the ObjectDataSource's The insert does not take place, nor does my ObjectDataSource2_Inserting event handler get called. Check that the 'values' dictionary contains values. ObjectDataSource 'ObjectDataSource2' has no values to insert. When the button is clicked, the event handler pulls the necessaryĭata out of the footer and calls the ObjectDataSource Insert method. Since GridView does not have support for insertions, I have put the necessary text controls into the GridView's footer along with a button. Methods, all of which take a single object parameter. The Select, Update, and Delete are performed automatically by the GridView and work correctly using my business object's ![]() I have a GridView object bound to an ObjectDataSource. ![]() #Insert using objectdatasource with duplicacy check manualI'm having difficulty getting a manual insert operation to work with ObjectDataSource. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |