Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. public void Search(string searchText)
  2. {
  3. ClientContext clientContext = new ClientContext("mySite");
  4.  
  5.  
  6. SP.List oList = clientContext.Web.Lists.GetByTitle("myList");
  7.  
  8. SP.CamlQuery camlQuery = new SP.CamlQuery();
  9. camlQuery.ViewXml = @"<Query><Where><Eq><FieldRef Name='searchColum' /><Value Type='valType'>" + searchText + "</Value></Eq></Where></Query>";
  10. SP.ListItemCollection listItemColl = oList.GetItems(camlQuery);
  11. clientContext.Load(listItemColl);
  12. clientContext.ExecuteQuery();
  13. //Convert listItemColl to dataTable and bind grid
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement