On SharePoint 2010 i have many wikipages containing a table. Is it possible to view the content of that page in vb.net using the client object model?
I tried to get the file code using a stream but the text i get is a lot of asp.net code but not the html code/content from that page...
Dim fileAlgemeen As SP.File = Nothing
Dim siteUrl As String = "https://portal.xx.be/sites/kdb"
Dim ctx As New ClientContext(siteUrl)
Dim credentials As NetworkCredential = New NetworkCredential("xx", "xx")
ctx.Credentials = credentials
Dim web As Web = ctx.Web
ctx.Load(web)
ctx.ExecuteQuery()
Dim relativeUrl As String = "/sites/kdb/596/Algemeen.aspx"
Dim file As SP.File = web.GetFileByServerRelativeUrl(relativeUrl)
ctx.Load(file)
ctx.ExecuteQuery()
Dim fileRef = relativeUrl
Dim fileInfo As FileInformation = SP.File.OpenBinaryDirect(ctx, fileRef.ToString())
Using fileInfo.Stream
Using sr As StreamReader = New StreamReader(fileInfo.Stream)
Dim line As String = sr.ReadToEnd()
lbl.Text = line
End Using
End Using