System.Web.UI.WebControls.ObjectDataSourceView.ObjectCreated Event

Occurs after the System.Web.UI.WebControls.ObjectDataSourceView object creates an instance of the type that is identified by the ObjectDataSourceView.TypeName property.

Syntax

public event ObjectDataSourceObjectEventHandler ObjectCreated

Remarks

Handle the ObjectDataSourceView.ObjectCreated event to call other methods on the business object, set properties, or to perform other initialization that is specific to the business object before the System.Web.UI.WebControls.ObjectDataSource control calls the Data methods for the business object. A reference to the object is accessed by the ObjectDataSourceEventArgs.ObjectInstance property, which is exposed by the System.Web.UI.WebControls.ObjectDataSourceEventArgs object.

If the method that is identified to perform the data operation is static (Shared in Visual Basic), the ObjectDataSourceView.ObjectCreating and ObjectDataSourceView.ObjectCreated events are never raised.

Requirements

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