473,320 Members | 1,950 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

ObjectDataSource: UpdateParameters ignored when specifying DataObjectTypeName?

I've got the following:

<asp:ObjectDataSource ID="lu" runat="server" TypeName="cFactory"
SelectMethod="GetLookup" UpdateMethod="UpdateLookup"
DataObjectTypeName="cLookupItem">
<SelectParameters>
<asp:QueryStringParameter Name="which" QueryStringField="lookup"
/>
</SelectParameters>
<UpdateParameters>
<asp:QueryStringParameter Name="which" QueryStringField="lookup"
/>
</UpdateParameters>
</asp:ObjectDataSource>

<asp:GridView ID="GridView1" runat="server" DataSourceID="lu"
AutoGenerateColumns="False">
<Columns>
<asp:BoundField DataField="Name" />
<asp:CommandField ShowEditButton="True" />
</Columns>
</asp:GridView>

Rather simple little one-column editable gridview.

My problem is with the update parameters. If I specify
DataObjectTypeName, the UpdateParameters section of the
ObjectDataSource seems to be ignored: "ObjectDataSource 'lu' could not
find a non-generic method 'UpdateLookup' that takes parameters of type
'cLookupItem'."

Is that normal? I'd like to pass my object plus selected other
parameters to the update method. If I omit the DataObjectTypeName, I
correctly get "ObjectDataSource 'lu' could not find a non-generic
method 'UpdateLookup' that has parameters: which, Name."

Obviously, I could write the update method to take which and Name as
parameters, but there are other cases which use other properties of the
cLookupItem object. I'd hate to have to make different update methods
for each.
From what I can tell, it is EITHER DataObjectTypeName OR

<updateparameters> but NOT both. Can someone verify that? Seems a bit
limiting.

Apr 17 '06 #1
1 2668
Hi,

I am having the same problem.

Hopefully MS can fix it.

Eric

Apr 28 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Anne Catterick | last post by:
Hi, I have an british ASP.Net 2.0 application which is doing what (should) be very simple. But I am having issues. On my page I have a GridView as follows (some tags excluded for easy...
13
by: anonymike | last post by:
Hello, I started working with the ObjectDataSource today. I have the select, and have been working on getting the update method to work. Here is the asp code for my Data source: ...
2
by: Damon | last post by:
Help! Need this fixed ASAP. I have a GridView/DetailsView master/details form set up, with both bound to separate ObjectDataSource objects. Both the GridView and the DetailsView have a...
1
by: Dabbler | last post by:
I have a FormView tied to ObjectDataSource that's not updating and am wondering what I missed.. <asp:FormView ID="fvRegDetail" runat="server" DefaultMode="Edit" DataKeyNames="RegistrantId"...
3
by: Jeronimo Bertran | last post by:
I have a FormView that shows details of a specific record on a table. The SelecMethod returns a DataSet that includes all the fields from my Event table and other read-only fields from linked...
0
by: Anabela Silva | last post by:
To anyone who has experienced this problem! Could not find a property named '... ' on the type specified by the DataObjectTypeName property in ObjectDataSource '...' I've been looking at...
1
by: Barry L. Camp | last post by:
Hi all, Wondering if someone can help with a nagging problem I am having using a GridView and an ObjectDataSource. I have a simple situation where I am trying to delete a row from a table, but...
4
by: tim.cavins | last post by:
I have a GridView populated by an ObjectDataSource. I am having issues passing the parameters to the objectdatasource. I have verified that the method is being called but none of the parameters...
9
by: Kernel Bling | last post by:
Hi Everyone, This Saturday the stage was set. The problem simply could not go on existing -- it had to be solved. Many hours, articles, compilations and frustrations later I still did not find...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.