Solved

SharePoint Lists View in ASP page

Posted on 2009-07-06
8
386 Views
Last Modified: 2012-06-27
I am creating a ASP page which list all the content in SharePoint custom list view. The SharePoint site contain Title, Body Message, Image, doc and xls documents. The following is my code for listing the Title:

   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
sharepoint-ListSetting.bmp
0
Comment
Question by:NewItem
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
8 Comments
 
LVL 11

Expert Comment

by:andrei_teodorescu
ID: 24827678
first of all, what are you trying to achieve? display the list in a table or in a listbox?
here you can find an easy method to load a SHP list into a ADO Datatable:
http://politechnosis.kataire.com/2009/02/reading-sharepoint-lists-into-adonet.html

second, here is how you can retrieve attachments:
http://blogs.msdn.com/sharepoint/archive/2007/03/25/retrieving-sharepoint-list-items-attachment-urls-using-lists-web-service.aspx
0
 

Author Comment

by:NewItem
ID: 24828042
I would like to get the content in the sharepoint forum, which included Title Text, Body Text, Image, xls/doc documents. Can Lists.asm collect all those information? When I go to AllItems.aspx I am only able to see Title but no body or image.
0
 
LVL 51

Expert Comment

by:Ted Bouskill
ID: 24829113
Why aren't you building this page directly in Sharepoint using Sharepoint Designer?

If you insist on using a non-Sharepoint site to access Sharepoint you need to use Sharepoint's web services.  You cannot use the Sharepoint API from non Sharepoint web applications.

0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

Author Comment

by:NewItem
ID: 24829851
I have to use non-sharepoint site to access sharepoint content. It is because I have to join the sharepoint content with other webpage. Will I able to use "_vti_bin/Lists.asmx" to get all the list titles and list description, image and documents. I am new to sharepoint I am only able to get list title but nothing else from the xml content. Do I miss anything in the code? I tried different way but I only get the title of the list but not the content.
0
 
LVL 51

Accepted Solution

by:
Ted Bouskill earned 500 total points
ID: 24831512
0
 

Author Closing Comment

by:NewItem
ID: 31600228
Good example.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Connect Gridview column to Textbox in C# 2 41
Hit counters in SharePoint 2013 2 29
SP converting date time to date and time separately 2 20
calculate days away 11 28
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question