10+ Useful SharePoint Client Object Model Methods
Following the console SharePoint COM app we created previously. Now I will show you how to create other useful methods. First Open Visual Studio and create an empty C# Console application, name it SP_COMapp. Add references to Microsoft.SharePoint.Client and Microsoft.SharePoint dlls. (found in Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI \ folder) Your Program.cs should have something like this using Microsoft.SharePoint.Client; using Microsoft.SharePoint; Next make sure the reference Copy Local property for these dlls are set to True. (Solution Explorer > Expand References > Click the references > Properties Window > Copy Local > True) Ok now we're good to go. The namespace region should look like this. namespace SP_COMapp { class Program { static void Main(string[] args) { } } } Now our COM methods will be as follows: List Sites place this inside the Program region not on the main, w...