Hi,
I'm having a bit of a problem with inserting an Object into my DB from a DetailsView. I've spent quite a bit of time on this and can't get it so I figure I must be doing something stupid.
I've got a method called for example Insert(MadeUpObject myObject, bool result) which when the user hits "Insert" should be called. I have this selected in my ObjectDataSource as my insert method. It has also populated the insert parameters with the correct parameters for that method:
<InsertParameters>
<asp:Parameter Name="myObject" Type="Object" />
<asp:Parameter Name="result" Type="Object" />
</InsertParameters>
However when the user hits "Insert" It gives an exception that says "cannot find a non-generic method with the parameters:" and then it lists myObject,result and then all the properties of MadeUpObject.
I have gotten around this in the past by creating a new method that takes all the properties of MadeUpObject and then creates an object and passes this to my insert, but I noticed when creating the DataSource it does say you can use a method such as Insert(Product p).
So any ideas what could be wrong?
Thanks in advance
(p.s. I'm using C#)