Introduction:
In this article we will learn how to create a List item in SharePoint 2013 using .NET Framework client object model (CSOM).
We can use the SharePoint client object model to create data in SharePoint 2013.
SharePoint makes the object model available in several forms.
- .NET Framework redistributable assemblies-CSOM & SSOM.
- JavaScript library
- REST/OData endpoints
The following article describes tasks that you can complete programmatically, and they include C# code examples that demonstrate CSOM operations.
When you create a Console Application in Visual Studio Select below assembly reference file,
Microsoft.SharePoint.Client.Runtime.dll
Microsoft.SharePoint.Client.dll.
Add below using statement to the code file.
usingMicrosoft.SharePoint.Client;
Run Visual Studio and select the Console application and name it Create a List Then type the below using Statement,
usingMicrosoft.SharePoint.Client;
Create a List item:

And select the assembly reference file in Visual studio,

Source Code:
Then Copy the below csomcode and paste it in Visual Studio,
- using System;
- usingSystem.Collections.Generic;
- usingSystem.Linq;
- usingSystem.Text;
- usingSystem.Threading.Tasks;
- usingMicrosoft.SharePoint;
- usingMicrosoft.SharePoint.Client;
- namespaceCraete_ListItem
- {
- classProgram
- {
- staticvoid Main(string[] args)
- {
- ClientContextctx = newClientContext("http://gowtham.sharepoint.com");
- // Assume that the web has a list named "Announcements".
- List oList = ctx.Web.Lists.GetByTitle("Announcements");
- ListItemCreationInformationitemCreateInfo = newListItemCreationInformation();
- ListItemnewItem = oList.AddItem(itemCreateInfo);
- newItem["Title"] = "Test Item!";
- newItem["Body"] = "welcome to Gowtham Blog";
- newItem.Update();
- context.ExecuteQuery();
- }
- }
- }

Check the SharePoint Site. List item has been added successfully.


Gowtham RajamanickamTOP 100Posted Apr 11, 2016, 10:22 PM EDT
more intresting features will come
Gowtham RajamanickamTOP 100Posted Apr 11, 2016, 10:21 PM EDT
pleasea follow my blogs
Gowtham RajamanickamTOP 100Posted Apr 11, 2016, 10:21 PM EDT
if u find any issue let me know
Gowtham RajamanickamTOP 100Posted Apr 11, 2016, 10:21 PM EDT
sorry for my misteake
Gowtham RajamanickamTOP 100Posted Apr 11, 2016, 10:21 PM EDT
ListItemCreationInformationi temCreateInfo = newListItemCreationInformation(); 23. ListItemnewItem = oList.AddItem(itemCreateInfo);
Gowtham RajamanickamTOP 100Posted Apr 11, 2016, 10:21 PM EDT
I forget toa dd some space