System.Web.UI.WebControls.ObjectDataSourceDisposingEventArgs.ObjectInstance Property

Gets an object that represents the business object with which the System.Web.UI.WebControls.ObjectDataSource control performs data operations.


public object ObjectInstance { get; }


Documentation for this section has not yet been entered.


If the data operation methods (ObjectDataSource.SelectMethod, ObjectDataSource.UpdateMethod, ObjectDataSource.DeleteMethod, and ObjectDataSource.InsertMethod) are instance methods, an instance of the business object is created before the method is executed. You can prevent the business object from being created for each call by saving the object in the ObjectDataSourceDisposingEventArgs.ObjectInstance property in the ObjectDataSource.ObjectDisposing event handler. In subsequent ObjectDataSource.ObjectCreating events, you can retrieve the business object from the ObjectDataSourceEventArgs.ObjectInstance property.


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