DataSourceView.ExecuteUpdate Method
Assembly: System.Web (in system.web.dll)
protected: virtual int ExecuteUpdate ( IDictionary^ keys, IDictionary^ values, IDictionary^ oldValues )
protected int ExecuteUpdate ( IDictionary keys, IDictionary values, IDictionary oldValues )
protected function ExecuteUpdate ( keys : IDictionary, values : IDictionary, oldValues : IDictionary ) : int
Not applicable.
Parameters
- keys
An IDictionary of object or row keys to be updated by the update operation.
- values
An IDictionary of name/value pairs that represent data elements and their new values.
- oldValues
An IDictionary of name/value pairs that represent data elements and their original values.
Return Value
The number of items that were updated in the underlying data storage.Data-bound controls can determine whether the ExecuteUpdate operation is supported by a data source control by using the DataSourceControl.GetView method to retrieve the DataSourceView object and checking the value of the CanUpdate property.
The keys parameter represents the object or row keys of the data to update. For data sources that represent relational data, such as the SqlDataSource control, the keys parameter is a collection of database primary keys. In other scenarios, the keys parameter is a collection of name/value pairs and is used to filter a list of data. Any data matching a name/value pair is updated with the values found in the values parameter, which is a set of name/value pairs that represents new values for existing fields or columns.
Note: |
|---|
|
The DataSourceView class's default implementation is to throw a NotSupportedException exception. If you extend the DataSourceView class, override the ExecuteUpdate method if your class supports updating data in the underlying data storage. |
Note: