Skip to main content
Tweeted twitter.com/#!/StackSharePoint/status/517021120969838593
deleted 1 character in body
Source Link
Vadim Gremyachev
  • 42.6k
  • 3
  • 87
  • 169

SharePoint 2013 CSOM API contains the following methods for accessing List object:

For example:

var listTitle = "Tasks";
using(var ctx = new ClientContext(webUrl))
{
     var list = ctx.Web.Lists.GetByTitle(listTitle);
     ctx.Load(list);
     ctx.ExecuteQuery();
}

From another hand, SSOM API contains SPWeb.GetList method to gets the list that is associated with the specified server-relative URL.

The question is: how to effectively to load ListList by server-relative URL in CSOM?

SharePoint 2013 CSOM API contains the following methods for accessing List object:

For example:

var listTitle = "Tasks";
using(var ctx = new ClientContext(webUrl))
{
     var list = ctx.Web.Lists.GetByTitle(listTitle);
     ctx.Load(list);
     ctx.ExecuteQuery();
}

From another hand, SSOM API contains SPWeb.GetList method to gets the list that is associated with the specified server-relative URL.

The question is: how to effectively to load List by server-relative URL in CSOM?

SharePoint 2013 CSOM API contains the following methods for accessing List object:

For example:

var listTitle = "Tasks";
using(var ctx = new ClientContext(webUrl))
{
     var list = ctx.Web.Lists.GetByTitle(listTitle);
     ctx.Load(list);
     ctx.ExecuteQuery();
}

From another hand, SSOM API contains SPWeb.GetList method to gets the list that is associated with the specified server-relative URL.

The question is: how to effectively load List by server-relative URL in CSOM?

Source Link
Vadim Gremyachev
  • 42.6k
  • 3
  • 87
  • 169

How to get List by Url using SharePoint 2013 CSOM

SharePoint 2013 CSOM API contains the following methods for accessing List object:

For example:

var listTitle = "Tasks";
using(var ctx = new ClientContext(webUrl))
{
     var list = ctx.Web.Lists.GetByTitle(listTitle);
     ctx.Load(list);
     ctx.ExecuteQuery();
}

From another hand, SSOM API contains SPWeb.GetList method to gets the list that is associated with the specified server-relative URL.

The question is: how to effectively to load List by server-relative URL in CSOM?