06 February 2013

ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'UpdateContact' that has parameters: Name, JobTitle, Department, PhoneNo, Email.

Have you experienced this error when you try to Update your table?

For the solution, you may simply add the following inside the ObjectDataSource:

<asp:ObjectDataSource .......>

  <SelectParameters>
           
                <asp:QueryStringParameter Name="ContactId"                   QueryStringField="ContactId" Type="Int32" DefaultValue="0" />
   </SelectParameters>



</asp:ObjectDataSource>


Make sure that the ContactId in our example is the primary key of your table.

No comments:

Post a Comment