ListItemCreationInformation Class
SharePoint 2010
Specifies the properties of the new list item.
System.Object
Microsoft.SharePoint.Client.ClientValueObject
Microsoft.SharePoint.Client.ListItemCreationInformation
Microsoft.SharePoint.Client.ClientValueObject
Microsoft.SharePoint.Client.ListItemCreationInformation
Assemblies: Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll); Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll)
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
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
- 9/11/2011
- David Severn