Detailsview itemupdating newvalues
This allows you to provide an event handler that performs a custom routine, such as checking the results of the update operation, whenever this event occurs.
Refer here: View (and Grid View) don't work properly when not used with a proper datasource.I am binding a Details View using Linq in my code-behind form. Count in my Item Updating event I have no key in the collection even though I editing data. However, the values in each control are available so what I need to do is create a new linq object and populated it with the values in my form and then call Submit Changes() on the linq object. According to some books I have the Data Context object must be persistent to be able to edit, update, delete and insert .I have an Item Updating event happening which is connected to a typical update button. Seeming that Web Apps are stateless that would be one area to look at. To List(), which does a conversion of the results of the query and any modification of this new list does not effect the Data Context and therefore not change can be made to the DB. Count in my Item Updating event I have no key in the collection even though I editing data." For some reason we are not given access to the keys of the collection but are allowed to change its values by using, e.You may want to use a Linq Data Source control which seems to keep the Data Context object persistent.