Big picture question about non-generic method errors

Big picture question about non-generic method errors

am 14.01.2008 20:17:00 von BChernick

Ok, classic error message: ObjectDataSource SoAndSo could not find a
non-generic method 'Update' that has parameters: yada yada yada.

Assume a page with an object data source and a detailsview control.

In the reference: http://msdn2.microsoft.com/en-us/library/57hkzhy5.aspx, if
I am reading this correctly, it states that an ODS, in addition to the
parameter list, will automatically create additional parameters based on the
binding of controls. (Correct me if I'm wrong.)

This apparently was happening to me. I kept getting the error message with
an additional field at the end that was in the Detailsview but not in the
Update parameters list of the ODS or the XSD.

Now this is anything but a normal project. In this case I wanted to be able
to set the field during add but not update it. So the first thing I tried
was to turn the field into a template field and remove the textbox from the
EditTemplate. This did not fix the problem. I was not able to update the
record until I removed all reference to that field from the DetailsView.

This is not an insurmountable problem for me. I can see a variety of
workarounds.

But why didn't it work?