Performs an insert operation by calling the business object method that is identified by the InsertMethod property using the specified values collection.
Assembly: System.Web (in System.Web.dll)
The ObjectDataSourceView class implements the inherited method to insert data into an underlying data store using a business object. Page developers and data-bound control authors do not call the method directly; instead, use the publicly exposed Insert method.
Before the insert is performed, the OnInserting method is called to raise the Inserting event. You can handle this event to examine the values of the parameters and perform any preprocessing before the Insert method is called.
To perform an insert operation, the ObjectDataSourceView control uses reflection to call the method that is identified by the InsertMethod property and any associated parameters that are in the values collection, and then executes it. After the operation completes, the OnInserted method is called to raise the Inserted event. You can handle this event to examine any return values, error codes, and perform any post-processing.
For more information on returning the number of rows inserted, see Insert.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)