Like a lot of us I'm green when it comes to SharePoint development. I've been tasked with moving MediaWiki content over to a SharePoint Enterprise wiki. At this time I do not have access to the server the SP is on and have to do this all client side. I can successfully GET information or even change a publishing page's content but I can't create a new wiki page with Microsoft.Sharepoint.Client (I tried via ListItem etc).
ClientContext context = new ClientContext("http://<site>/"); ListItem LItem = pagesList.GetItemById(8); LItem["PublishingPageContent"] = "This is my new value!!"; LItem.Update(); context.ExecuteQuery();
The above code worked great! Then I tried:
ListItemCreationInformation newPage = new ListItemCreationInformation(); ListItem newpageitem = pagesList.AddItem(newPage); newpageitem["Title"] = "OtherCompany"; newpageitem["PublishingPageContent"] = "Info for Other Company"; newpageitem.Update(); context.Load(newpageitem);
this didn't work so great. :-(
Does anyone know if this is even possible to do this client side?