SharePoint - How to start a SharePoint Client Object Model project in Visual studio - SharePoint 2010

Asked By Ajain A K P on 17-Sep-13 04:13 AM
I want to do a SharePoint task of updating a list, can somebody help me what are the basic steps to be
done in visual studio 2010 to execute this code

Which VSS project project template I should select ( console application, Empty project, windows application etc ????? )

File -> New -> Project  ???????? which template I should select??????

    static void Main(string[] args)
      {
        using (ClientContext clientContext = new ClientContext("http://mylocalhost/"))
        {

          Site siteCollection = clientContext.Site;
          Web site = clientContext.Web;
          List registration = site.Lists.GetByTitle("listsample");
          ListItemCollection lItems = registration.GetItems(new CamlQuery());
          clientContext.Load(lItems, items => items.Include(i => i["Itm1"], i => i["Itm2"], i => i["Itm3"]));
          clientContext.ExecuteQuery();
          foreach (ListItem item in lItems)
          {
            item["Itm2"] = "Success";
            item.Update();
            clientContext.ExecuteQuery();
          }

        }

Vinitha Jayakrishnan replied to Ajain A K P on 18-Sep-13 07:10 AM
Hi,

please refer this link:

http://msdn.microsoft.com/en-us/library/ff798328.aspx