PC Review


Reply
Thread Tools Rate Thread

Big picture question about non-generic method errors

 
 
B. Chernick
Guest
Posts: n/a
 
      14th Jan 2008
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?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generic method which returns generic type Zdenko Microsoft C# .NET 13 27th Oct 2008 07:23 AM
Generics Question - how to implement a method on a generic thatreturns the same type as the generic IUnknown Microsoft C# .NET 0 20th Mar 2008 06:34 PM
non-generic method =?Utf-8?B?RGF2ZQ==?= Microsoft C# .NET 1 20th Feb 2007 12:21 AM
ObjectDataSource & FormView adding two extra paramaters to Update method giving error non-generic method ... Fred Dag Microsoft ASP .NET 0 18th Sep 2006 11:36 PM
ObjectDataSource & FormView adding two extra paramaters to Update method giving error non-generic method ... Fred Dag Microsoft ADO .NET 0 18th Sep 2006 05:24 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:56 AM.