we have to add this reference
Microsoft.SharePoint.Client
Microsoft.SharePoint.Client.Runtime
ClientContext context = new ClientContext("http://peakfinders");
Web web = context.Web;
List list = web.Lists.GetByTitle(“Users”);
CamlQuery caml=new CamlQuery();
ListItemCollection items = list.GetItems(caml);
context.Load<List>(list
context.Load<ListItemCollection>(items
context.ExecuteQuery();
foreach (Microsoft.SharePoint.Client.ListItem item in items)
{
Console.WriteLine(item.FieldValues["Title"]);
}
Console.ReadLine();
Microsoft.SharePoint.Client
Microsoft.SharePoint.Client.Runtime
ClientContext context = new ClientContext("http://peakfinders");
Web web = context.Web;
List list = web.Lists.GetByTitle(“Users”);
CamlQuery caml=new CamlQuery();
ListItemCollection items = list.GetItems(caml);
context.Load<List>(list
context.Load<ListItemCollection>(items
context.ExecuteQuery();
foreach (Microsoft.SharePoint.Client.ListItem item in items)
{
Console.WriteLine(item.FieldValues["Title"]);
}
Console.ReadLine();
No comments:
Post a Comment