Check List Exists in Sharepoint 2010 Site using Client Object Model
Referred URL
{
List existingList;
Web web = clientContext.Web;
ListCollection lists = web.Lists;
IEnumerable<List> existingLists = clientContext.LoadQuery(
lists.Where(
list => list.Title == listTitle)
);
clientContext.ExecuteQuery();
existingList = existingLists.FirstOrDefault();
return existingList;
}
0 comments