I am using the .net client object model for SharePoint 2010. I am able to create a new wiki page in my wikipagelibrary using the following method:
Dim wikiLibrary = context.Web.Lists.GetByTitle(wikiPageLibraryTitle)
context.Load(wikiLibrary.RootFolder)
context.ExecuteQuery()
Dim relativeUrl As String = "/sites/kdb/" & txt.Text & "/" & pageName
Dim fileAlreadyExcists As Boolean = CheckIfWikiPageExcists(context, relativeUrl)
If Not fileAlreadyExcists Then
Dim pageUrl = String.Format("{0}/{1}", wikiLibrary.RootFolder.ServerRelativeUrl, pageName)
Dim wikiFile = wikiLibrary.RootFolder.Files.AddTemplateFile(pageUrl, TemplateFileType.WikiPage)
context.Load(wikiFile)
context.ExecuteQuery()
Dim wikiPage = wikiFile.ListItemAllFields
wikiPage("WikiField") = pageContent
wikiPage.Update()
context.ExecuteQuery()
Else
MessageBox.Show("Deze Pagina bestaat al!")
End If
One of the parameters of this method is "wikiPageLibraryTitle". How can I get that title if i only know the URL of the library?