views:

72

answers:

1

I'm using a detailsview control to update a record, however in this particular case there's only one field that can be changed out of a many. The update method for my object takes all fields as parameters. When the detailsview's updating method fires, the values for the readonly fields (those rendered as a Label) are not available in the e.NewValues collection.

I'm currently grabbing a reference to the object when the detailsview is databound (in the objectdatasource selected event handler), storing it in session and manually adding entries to the e.NewValues collection when updating fires. It works but seems kind of heavy handed.

So, is there a better way to get the read only values back into my update method? Or is there a better way of doing this altogether?

A: 

Hey,

There should be an OriginalValues collection too, which may have the collection of readonly values... can you verifiy that?

HTH.

Brian
there's an OldValues collection, that seems to be it. thanks.
lincolnk