How to share the list of other websites in SharePoint

Source: Internet
Author: User
This article ArticleHttp://www.cnblogs.com/firstyi/archive/2007/12/27/1016813.html
The two methods are described, and the SPD is used in the end. The following method is used completely. CodeImplementation:

Spview has an renderashtml method, which can be used to conveniently output the content of any list. In addition, spview supports configuration. We can
You can easily configure the fields to be displayed and the sorting method. So as long as spview is obtained, we can share any list of data:

Spsite site = new spsite ("http: // jyserver: 9000/lists/AAAA/allitems. aspx ");
Splist list = site. rootweb. getlistfromurl ("http: // jyserver: 9000/lists/AAAA/allitems. aspx ");
Spview view = List. defaultview;
// Or spview view = List. views ["viewname"];
String html = view. renderashtml ();

Embed the above code into a page or webpart.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.