System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs Class

Provides data for the ObjectDataSource.Inserting, ObjectDataSource.Updating, and ObjectDataSource.Deleting events of the System.Web.UI.WebControls.ObjectDataSource control.

See Also: ObjectDataSourceMethodEventArgs Members

Syntax

public class ObjectDataSourceMethodEventArgs : System.ComponentModel.CancelEventArgs

Remarks

The System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs class is used in the ObjectDataSourceView.OnSelecting(ObjectDataSourceSelectingEventArgs), ObjectDataSourceView.OnUpdating(ObjectDataSourceMethodEventArgs), ObjectDataSourceView.OnInserting(ObjectDataSourceMethodEventArgs), and ObjectDataSourceView.OnDeleting(ObjectDataSourceMethodEventArgs) methods to provide access to input parameters that are passed to the ObjectDataSource.Select, ObjectDataSource.Update, ObjectDataSource.Delete, and ObjectDataSource.Insert methods of the System.Web.UI.WebControls.ObjectDataSource control. These parameters are accessed using the ObjectDataSourceMethodEventArgs.InputParameters property. By adding a delegate to handle the ObjectDataSource.Selecting, ObjectDataSource.Updating, ObjectDataSource.Inserting, or ObjectDataSource.Deleting event, you can examine and manipulate the values of the parameters and perform any additional preprocessing that is required. Any changes to the parameters in this dictionary will affect which method overload is called for the operation. When the ObjectDataSource.DataObjectTypeName property of the System.Web.UI.WebControls.ObjectDataSource control is set, you can only modify the data object properties for the items in this dictionary; you cannot add or remove parameters. For more information, see ObjectDataSource.Delete.

The System.Web.UI.WebControls.ObjectDataSource control exposes many events that you can handle to work with the underlying business object at various times in its life cycle. The following table lists the events and associated EventArgs classes and event handler delegates.

ObjectDataSource.ObjectCreating.

Occurs immediately before the instance of the business object is created.

System.Web.UI.WebControls.ObjectDataSourceEventArgs

System.Web.UI.WebControls.ObjectDataSourceObjectEventHandler

ObjectDataSource.ObjectCreated.

Occurs immediately after the instance of the business object is created.

System.Web.UI.WebControls.ObjectDataSourceEventArgs

System.Web.UI.WebControls.ObjectDataSourceObjectEventHandler

ObjectDataSource.Selecting.

Occurs before the data is retrieved.

System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs

System.Web.UI.WebControls.ObjectDataSourceSelectingEventHandler

ObjectDataSource.Inserting, ObjectDataSource.Updating, and ObjectDataSource.Deleting.

Occur before an insert, update, or delete operation is performed.

System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs

System.Web.UI.WebControls.ObjectDataSourceMethodEventHandler

ObjectDataSource.Selected.

Occurs after the data is retrieved.

System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs

System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler

ObjectDataSource.Inserted, ObjectDataSource.Updated, and ObjectDataSource.Deleted.

Occur after the insert, update, or delete operation is completed.

System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs

System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler

ObjectDataSource.ObjectDisposing.

Occurs before a business object is destroyed.

System.Web.UI.WebControls.ObjectDataSourceDisposingEventArgs

System.Web.UI.WebControls.ObjectDataSourceDisposingEventHandler

Requirements

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