System.Web.UI.WebControls.SqlDataSourceStatusEventArgs Class

Provides data for an event that is raised by the System.Web.UI.WebControls.SqlDataSource control after a data operation has completed.

See Also: SqlDataSourceStatusEventArgs Members


public class SqlDataSourceStatusEventArgs : EventArgs


The System.Web.UI.WebControls.SqlDataSourceStatusEventArgs class is used in the SqlDataSource.Selected, SqlDataSource.Updated, SqlDataSource.Inserted, and SqlDataSource.Deleted events to pass information about a database operation after it is performed by the data source control. This information includes the number of rows affected by the operation, the System.Data.Common.DbCommand object that the data source used to perform the operation, and any exception information that resulted. By adding an event handler delegate to handle the SqlDataSource.Selected, SqlDataSource.Updated, SqlDataSource.Inserted or SqlDataSource.Deleted events, you can examine this data and perform any additional post processing required.

The System.Web.UI.WebControls.SqlDataSource control exposes many events that you can handle to work with the underlying data objects during the course of a data operation. The following table lists the events and associated EventArgs and event handler classes, to better guide you to the various events that correspond to the life cycle of a data operation using the System.Web.UI.WebControls.SqlDataSource control.

SqlDataSource.Selecting occurs before the data is retrieved.



SqlDataSource.Inserting, SqlDataSource.Updating, SqlDataSource.Deleting occur before an insert, update, or delete operation is performed.



SqlDataSource.Selected, SqlDataSource.Inserted, SqlDataSource.Updated, SqlDataSource.Deleted occur after the data retrieval, insert, update, or delete operations completes.




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