View. Insert Item(Boolean) Method
Inserts the current record in the data source.
public: virtual void InsertItem(bool causesValidation);
public virtual void InsertItem (bool causesValidation);
abstract member InsertItem : bool -> unit override this.InsertItem : bool -> unit
Public Overridable Sub InsertItem (causesValidation As Boolean)
true to perform page validation when the method is called; otherwise,
This method is called when the DetailsView control is not in insert mode.
When the DetailsView control is in insert mode, use the InsertItem method to programmatically insert the current record in the data source. This method is commonly used when you need to insert the current record from outside of the DetailsView control, such as from a different control on the page.