So I substituted the code above with: Am I doing something wrong here.
or am I just unlucky, or is there another way I am supposed to handle this?
This allows you to provide an event-handling method that performs a custom routine, such as HTML encoding the values of a record before updating it in the data source, whenever this event occurs.
If you need to access the original non-key field values, use the Old Values property.
In that method I have the following line of code: EXACTLY the same line of code appears in the method that handles the Item Inserting event (except I use Values instead of New Values) and it works flawlessly.
However, when updating the line of code above gives rise to an exception because the string format is invalid. Tracing during debugging shows that the control is there, but it doesn't have any data in it.
I am using a Form View to update an existing SQL Server record.
The rows from the sqldatasource display fine in the Form View and I can edit them.
Item Updating event is raised when an Update button within a Details View control is clicked, but before the update operation.