OldValues and NewValues collections are empty

D

Doug Kent

When my FormView uses its ObjectDataSource to save changes, in the FormView's
ItemUpdating handler, the FormViewUpdateEventArgs OldValues and NewValues
collections are both completely empty.

The FormView is bound to an ObjectDataSource. The
ObjectDataSource has DataObjectTypeName, OldValuesParameterFormatString
and ConflictDetection set as shown below:

<asp:ObjectDataSource ID="ListingsDataSource" runat="server"
TypeName="Listing"
SelectMethod="GetListingWithAgent"
UpdateMethod="Update"
DataObjectTypeName ="Listing"
OldValuesParameterFormatString ="oldEntity"
ConflictDetection ="CompareAllValues"<selectparameters>
<asp:QueryStringParameter QueryStringField="lid"
Type="Int32" Direction="Input" Name="Listing_ID" />
<asp:QueryStringParameter QueryStringField="ts"
Type="String" Direction="Input" Name="timeStampEncoded" />
</selectparameters>
</asp:ObjectDataSource>

The FormView DefaultMode is "Edit", the bound controls in the EditTemplate
are populated by the FormView no problem (using "Bind"). No problem with
selecting.

The FormView looks like this:


<asp:FormView ID="ListingFormView" runat="server"
DataSourceID="ListingsDataSource"
DataKeyNames="ID,Timestamp"
DefaultMode="Edit"
AllowPaging="false">


Anyone have a clue what could be causing this behavior? Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top