B
B. Chernick
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?
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?