Tag Info

Hot answers tagged

2

The following method demonstrates how to resolve ClientContext by request Url: private static bool TryResolveClientContext(Uri requestUri, ref ClientContext context, ICredentials credentials) { var baseUrl = requestUri.GetLeftPart(UriPartial.Authority); for (int i = requestUri.Segments.Length; i >= 0; i--) { var path = ...


2

string siteUrl = "http://MyServer/sites/MySiteCollection"; ClientContext clientContext = new ClientContext(siteUrl); Site collSite = clientContext.Site; RecycleBinItemCollection collRBI = collSite.RecycleBin; clientContext.Load(collRBI); clientContext.ExecuteQuery(); Try the above code. Make sure the current user can see the Recycle Bin by opening it in ...


1

You can use SharePoint 2013 Search APIs for this. The pre requisites for using this approach is: Search service application created and running with good crawl system scheduled. Enable continuous crawl, so that new results will appear. Make sure your document library is set to YES to Allow items to appear in search results in the Advanced Settings of the ...


1

I think we have to load the web object first, before you retrieve any lists from it. Follow the example from MSDN (paraphrased) : function deleteList(siteUrl) { var clientContext = new SP.ClientContext(siteUrl); var oWebsite = clientContext.get_web(); this.listTitle = 'Project Documents'; this.oList = ...


1

Use two quotes. That is 'Shekar''s.pptx'



Only top voted, non community-wiki answers of a minimum length are eligible