ObjectDataSourceView.ObjectCreating Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs before the ObjectDataSourceView object creates an instance of the type that is identified by the TypeName property.
public:
event System::Web::UI::WebControls::ObjectDataSourceObjectEventHandler ^ ObjectCreating;
public event System.Web.UI.WebControls.ObjectDataSourceObjectEventHandler ObjectCreating;
member this.ObjectCreating : System.Web.UI.WebControls.ObjectDataSourceObjectEventHandler
Public Custom Event ObjectCreating As ObjectDataSourceObjectEventHandler
Event Type
Remarks
The ObjectDataSource control automatically calls the parameterless constructor of a business object to create and instance of it using reflection. Handle the ObjectCreating event to explicitly call another constructor and to set the instance of the object that results to the ObjectInstance property of the associated ObjectDataSourceEventArgs object.
For more information about how to handle events, see Handling and Raising Events.
If the method that is identified to perform the data operation is static
(Shared
in Visual Basic), the ObjectCreating and ObjectCreated events are never raised.