System.Web.UI.WebControls.SqlDataSourceCommandEventArgs.Command Property

Gets the pending database command.

Syntax

public System.Data.Common.DbCommand Command { get; }

Value

Documentation for this section has not yet been entered.

Remarks

You can handle the SqlDataSource.Updating, SqlDataSource.Inserting, or SqlDataSource.Deleting event to examine and manipulate the properties of the System.Data.Common.DbCommand before it is run by the System.Web.UI.WebControls.SqlDataSource control. The connection to the underlying data source is not yet open when the event handler delegate is called. Therefore, you cannot cancel the database operation by calling the System.Data.Common.DbCommand.Cancel method on the System.Data.Common.DbCommand object directly. However, you can cancel the database operation by setting the System.ComponentModel.CancelEventArgs.Cancel property of the System.Web.UI.WebControls.SqlDataSourceCommandEventArgs to true.

Requirements

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