NET 3.5 SP1This post describes two gotchas with the Form View control when binding:1) When performing two way databinding, Null values and Nullables get changed to string. 2) Two way binding is not supported for nested controls.
When performing two way databinding, Null values and Nullables get changed to string. The way the Form View control handles null values has caused me some grief :-( Consider a Form View bound to an Object Data Source like so: On the other hand, if we try the same thing with the Details View control, the Last Name will still be “null” on update.
The Form View displays properly for all modes(Item Template/Edit Template/Insert Template) 3. I submit the change via a Button that calls Form View Item Update Command 5. The keys collection is populated with the Data Key Names.
My Objectdatasource is populated & bound to Form View 2.
There you have access to the object via the Event Args. New Object or something like that You can cast this property into the corresponding type and make your changes.Here we have a Text Box inside an Update Panel inside the Edit Item Template.Since two way binding is not supported for the First Name Text Box, the special code for extracting values is not generated resulting in null being sent back for the First Name property. I just don't understand why using a nested control doesn't work properly.So I figured maybe they have to be two-way databound to access the Old Values collection. So now I can access the Old Values, but any values set in the New Values collection are ignored when the update is made to the database. Is this the designed behavior for the Old Values, New Values collections?event is raised when an Update button within a Details View control is clicked, but before the update operation.