how to obtain the list name through cross-domain CSOM Provided that I have the list GUID. Any easy way for the conversion ?
1 Answer
You can get a list name from SharePoint using CSOM using below mentioned code.
using System;
using Microsoft.SharePoint.Client;
using SP = Microsoft.SharePoint.Client;
namespace Microsoft.SDK.SharePointServices.Samples
{
class RetrieveAllListProperties
{
static void Main()
{
string siteUrl = "http://MyServer/sites/MySiteCollection";
ClientContext clientContext = new ClientContext(siteUrl);
Web oWebsite = clientContext.Web;
ListCollection collList = oWebsite.Lists;
clientContext.Load(collList);
clientContext.ExecuteQuery();
foreach (SP.List oList in collList)
{
Console.WriteLine("Title: {0} Created: {1}", oList.Title, oList.Created.ToString());
}
}
}
}
If you are working with cross domain environment than you must have to use JavaScript. You can get idea from Complete basic operations using JavaScript library code in SharePoint 2013