LinqDataSource.Update Method (IDictionary, IDictionary, IDictionary)
Performs an update operation.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
Parameters
- keys
-
Type:
System.Collections.IDictionary
The row key values for the records to be updated.
- values
-
Type:
System.Collections.IDictionary
The row values to be updated in the data source.
- oldValues
-
Type:
System.Collections.IDictionary
The row values that are evaluated to detect data conflicts.
Typically, you do not have to call the Update method from your code. The data-bound control will automatically call the Update method when the user takes action to update a record. You explicitly call the Update method when you want to create your own process for updating data.
The following example shows how to programmatically update a record in the data source after the user clicks a button. The code passes a ListDictionary object that contains the key value, a ListDictionary object that contains the original values, and a ListDictionary object that contains the new values to the Update method.
The following example shows the markup for the previous example.
Available since 3.5