SPDataSourceView.ExecuteInsert Method
Inserts a new item into a list.
Namespace: Microsoft.SharePoint.WebControls
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Protected Overrides Function ExecuteInsert ( _
values As IDictionary _
) As Integer
'Usage
Dim values As IDictionary
Dim returnValue As Integer
returnValue = Me.ExecuteInsert(values)
protected override int ExecuteInsert(
IDictionary values
)
Parameters
values
Type: System.Collections.IDictionaryA dictionary that contains at least one key/value pair. Each key is the name of a field in the list item. Each value is the initial value for the field.
Return Value
Type: System.Int32
A System.Int32 value that is the number of items inserted. In this implementation, the return value is either 0 or 1.
Exceptions
Exception | Condition |
---|---|
NotSupportedException | The current view does not support insertion operations. |
Remarks
The ExecuteInsert method adds a new item to a list. The method determines which list to add an item to by examining the InsertParametersDictionary.