System.Web.UI.WebControls.ObjectDataSource.ConflictDetection Property

Gets or sets a value that determines whether or not just the new values are passed to the Update method or both the old and new values are passed to the Update method.

Syntax

[System.ComponentModel.DefaultValue(System.Web.UI.ConflictOptions.OverwriteChanges)]
public System.Web.UI.ConflictOptions ConflictDetection { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

This property determines whether parameters for old and new values are applied to the method specified by the ObjectDataSource.UpdateMethod property. For example, if the method that is specified by the ObjectDataSource.SelectMethod property returns a System.Data.DataTable control with the columns Name and Number, and the ObjectDataSource.ConflictDetection property is set to the System.Web.UI.ConflictOptions.OverwriteChanges field, parameters are created for Name and Number for the Update method. If the ObjectDataSource.ConflictDetection property is set to the System.Web.UI.ConflictOptions.CompareAllValues value, parameters are created for Name, Number, original_Name, and original_Number. (The exact name of the parameters for the original values depends on the ObjectDataSource.OldValuesParameterFormatString property.) The System.Web.UI.WebControls.ObjectDataSource then determines whether the method that is specified in the ObjectDataSource.UpdateMethod property has parameters that match.

Concurrency control is a technique that data stores use to control how data is read and changed in the store when multiple clients are accessing and manipulating the same data. For example, one client reads data and presents it to a user, while another client reads the same data and presents it to a different user. If both users update the data and submit it to the data storage, an unexpected result might occur, because both clients might provide different values for the same data. This is considered a conflict. By setting the ObjectDataSource.ConflictDetection property to the System.Web.UI.ConflictOptions.CompareAllValues value, the Update method can then compare the old and new values to the original data source to detect conflicts and handle them as necessary.

The ObjectDataSource.ConflictDetection property delegates to the ObjectDataSourceView.ConflictDetection property of the System.Web.UI.WebControls.ObjectDataSourceView object that is associated with the System.Web.UI.WebControls.ObjectDataSource control.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0