Guest User

Untitled

a guest
May 22nd, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. ClientContext clientContext = new
  2. ClientContext("https://sharepointsite.com
  3. Web web = clientContext.Web;
  4. ListCollection listColl = web.Lists;
  5.  
  6. List list = listColl.GetByTitle("Applications");
  7.  
  8. //----------------------------------------------------
  9. //Display Items in List
  10. //----------------------------------------------------
  11.  
  12. CamlQuery query = new CamlQuery();
  13. query.ViewXml = "<View/>";
  14. ListItemCollection items = list.GetItems(query);
  15.  
  16. clientContext.Load(items);
  17. if (clientContext.HasPendingRequest)
  18. {
  19. clientContext.ExecuteQueryAsync().Wait();
  20. }
Add Comment
Please, Sign In to add comment