1 out of 1 rated this helpful - Rate this topic

ListItemCreationInformation Class

SharePoint 2010

Specifies the properties of the new list item.

System.Object
  Microsoft.SharePoint.Client.ClientValueObject
    Microsoft.SharePoint.Client.ListItemCreationInformation

Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll);  Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll)
[ScriptTypeAttribute("SP.ListItemCreationInformation", ValueObject = true, 
	ServerTypeId = "{54cdbee5-0897-44ac-829f-411557fa11be}")]
public sealed class ListItemCreationInformation : ClientValueObject
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
VB example of using ListItemCreationInformation
Imports Microsoft
Imports Microsoft.SharePoint.Client

Module MainModule

    'Very simple VB example of using ListItemCreationInformation and client object model to create a new SharePoint list item

    Private DestinationSite As String = http://sp2010
    Private DestinationList As String = "Test List"

    Sub Main()

        Using ctx = New ClientContext(DestinationSite)

            Dim list = ctx.Web.Lists.GetByTitle(DestinationList)

            Dim ItemCreationInfo As ListItemCreationInformation = New ListItemCreationInformation

            Dim NewItem As ListItem

            NewItem = list.AddItem(ItemCreationInfo)

            NewItem("Title") = "My Title"

            NewItem.Update()

            ctx.ExecuteQuery() 'Tell the context object to actually run the commands

        End Using

        System.Environment.Exit(0)
#If DEBUG Then
        'leave cosnole open during testing/ debugging
        Console.Read()
#End If

    End Sub

End Module