Skip to main content

Insert operation with Sharepoint List using CSOM.

To insert item into list using csom code. You can create a consol application using visual studio and also use the code mentioned below. You can interact  with sharepoint list using JSOM,CSOM or using rest api.
List operation using csom.


using Microsoft.SharePoint.Client; 
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Security; 
using System.Text; 
using System.Threading.Tasks; 
namespace ConsoleApp1 {
class Program {
static void Main(string[] args)
{
using (ClientContext clientContext = new ClientContext("insert url upto list"))
{
string Uname = "Your ID";
string password = "Password"; 
SecureString Securepasseord = GetSecureString(password); 
clientContext.Credentials = new SharePointOnlineCredentials(Uname, Securepasseord); clientContext.ExecuteQuery();
List oList = clientContext.Web.Lists.GetByTitle("metalist"); 
ListItemCreationInformation listCreationInformation = new ListItemCreationInformation(); 
ListItem oListItem = oList.AddItem(listCreationInformation); 
oListItem["Title"] = "This is title";
 oListItem["Keywords"] = "test"; 
oListItem.Update(); 
clientContext.ExecuteQuery();
}
}
private static SecureString GetSecureString(String Password)
{
SecureString oSecurePassword = new SecureString(); foreach (Char c in Password.ToCharArray()) { oSecurePassword.AppendChar(c); } return oSecurePassword;
}
}
}

Comments

Popular posts from this blog

SharePoint Designer workflow error : server side activities have been updated. you need to restart sharepoint designer to use the updated version of activities.

While working with SharePoint designer at the time of creating custom forms and workflows, on editing the workflow or creating new one, error occured and stated as :

"server side activities have been updated. you need to restart sharepoint designer to use the updated version of activities."

to resolve this error follow steps provided below.

Before moving on the steps mentioned below some time it's needed to clear the cache.

First clear the cache from locations mentioned below:
%APPDATA%\Microsoft\Web Server Extensions\Cache %APPDATA%\Microsoft\SharePoint Designer\ProxyAssemblyCache %USERPROFILE%\AppData\Local\Microsoft\WebsiteCache %APPDATA%\Microsoft\SharePoint Designer
Steps to resolve this problem:
To resolve this issue you need to update the SharePoint designer and to do so you have to follow this
two steps :

1. Check whether the Microsoft SharePoint 2013 service pack 1 is installed or not in your system.If not Please download it and install from URL mentioned below : 
F…

The Google Doodle...

Everyday when we open browser is and type www.google.com and page is open, we see that Google logo is appearing very attractive and showing some message, question arise in our mind
1 what is this image?
2 who design it?

So, we will give you answer of all the question.......!
Every time when we hit google.com in any web browser and google search page is appeared with an attractive google logo and that attractive image is nothing but an Google Doodle.

What is this Google Doodle?
Doodles are the changes made with google logo to celebrate an special event, an special day or birth anniversary of artist, scientist. This is the google's way to tribute.
All started when the  first time when the stick figure drawn behind the second "o" of google in 1998, Burning Man Fastival.

Who Design Google Doodle?
Google Doodle is designed by the team of best illustrator call them doodlers with team of engineers.

Google user can also share idea for google doodle?
Hundreds of user everyday share…

Tez become Google Pay.

Tez become Google Pay, Google pay have all the functionalities which was exists in tez.
Google pay come with new exciting and user friendly features, which definitely impress the users, rewards and offers remains same like Tez.


Google pay offering some new exciting features, using it you can send money even if your contact is not on google pay.  Pay money using the Google pay now you can send money to those contact, who are not on Google play.Recharge your mobile using Google Pay.Pay near by, this is very impressive now you can send money to another google pay user without sharing private details like Bank account and contact number, same as handling cash.    Google Pay is available on the Google Play and App store. for more information you can visit "https://pay.google.com/intl/en_in/about/"