I have this code :

ClientContext clientContext = new ClientContext(this.siteURL);
List oList = clientContext.Web.Lists.GetByTitle("AList");

I cant seem to access any properties for oList, is there a way to tell that the clientContext object is connected to sharepoint?


Have you done clientContext.Load(oList) ?

| improve this answer | |
  • No, do I need to do that? – user879 Dec 14 '10 at 12:38
  • yep, you need to initialize the context with whatever objects you want to have instantiated when you run ExecuteQuery/Async. – James Love Dec 14 '10 at 14:41
  • To be fair Microsoft have tried to document this on MSDN. I still think the objects should have more closely resembled stuff like ado.net, but I think once I get more into clientContext it will start making sense! thanks again. – user879 Dec 15 '10 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.