System.Web.UI.WebControls.SqlDataSourceView.Delete Method

Performs a delete operation using the SqlDataSourceView.DeleteCommand SQL string, any parameters that are specified in the SqlDataSourceView.DeleteParameters collection, and the values that are in the specified keys and oldValues collections.

Syntax

public int Delete (IDictionary keys, IDictionary oldValues)

Parameters

keys
An IDictionary of object or row key values for the SqlDataSourceView.ExecuteDelete(IDictionary, IDictionary) operation to delete.
oldValues
An IDictionary that contains row values that are evaluated only if the SqlDataSourceView.ConflictDetection property is set to the System.Web.UI.ConflictOptions.CompareAllValues value.

Returns

A value that represents the number of rows deleted from the underlying database.

Remarks

The SqlDataSourceView.Delete(IDictionary, IDictionary) method calls the SqlDataSourceView.ExecuteDelete(IDictionary, IDictionary) method, passing the keys and oldValues parameters.

Requirements

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