Solved
View Sharepoint content with ASP.net
Posted on 2009-07-03
I create a webpage to view SharePoint content. I am able to get Title from SharePoint Lists.asm service. But I cannot get the body text/images for each titles. The following is my code:
Private Function GetListNode() As XmlNode
Dim RCPILists As New engage.Lists()
RCPILists.Credentials = New System.Net.NetworkCredential("TestUser1", "Pwd1", "Domain1")
Dim TEXT1 As XmlNode = RCPILists.GetListItems("{A3621D46-5961-4B61-BC70-E2BFE7A31BC4}", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)
Return TEXT1
End Function
Protected Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim node As XmlNode = GetListNode()
Dim xr As New XmlTextReader(node.OuterXml, XmlNodeType.Element, Nothing)
Dim ds As New DataSet
ds.ReadXml(xr)
SharePointListBox.DataSource = ds.Tables("row")
SharePointListBox.DataTextField = "ows_LinkTitle"
SharePointListBox.DataBind()
End Sub