Provides data for the ObjectDataSource.ObjectDisposing event of the System.Web.UI.WebControls.ObjectDataSource control.
See Also: ObjectDataSourceDisposingEventArgs Members
The System.Web.UI.WebControls.ObjectDataSourceDisposingEventArgs class is used in the ObjectDataSourceView.OnObjectDisposing(ObjectDataSourceDisposingEventArgs) method to provide access to the business object instance after any data operations that are using the System.Web.UI.WebControls.ObjectDataSource control and business object are performed, but before the business object is destroyed. The business object is accessed using the ObjectDataSourceDisposingEventArgs.ObjectInstance property. By adding a delegate to handle the ObjectDataSource.ObjectDisposing event, you can access any publicly exposed members of the business object to perform any final work or clean up.
The ObjectDataSourceView.OnObjectDisposing(ObjectDataSourceDisposingEventArgs) method is not called by the System.Web.UI.WebControls.ObjectDataSource control, if the method that performs data operations is a static method. No business object instance is created when the method is static.
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 lifecycle. The following table lists the events and the associated EventArgs classes and event handler delegates.