简体   繁体   English

Sharepoint 2010从远程SPSite在Webpart上显示SPList

[英]Sharepoint 2010 Show SPList on webpart from a remote SPSite

Im new to sharepoint and im trying to get a SPList from another SPSite i have on same farm, that itself is not a problem. 我是sharepoint的新手,并且尝试从我在同一服务器场中拥有的另一个SPSite获取SPList,这本身不是问题。

But i want to do something like this: http://prazjain.wordpress.com/2009/11/13/programmatically-add-splist-as-webpart-on-spweb-using-listviewwebpart/ 但我想做这样的事情: http : //prazjain.wordpress.com/2009/11/13/programmatically-add-splist-as-webpart-on-spweb-using-listviewwebpart/

problem is, it doesnt seem to work when the list is not on my current SPSite... Is there an alternative besides ListViewWebPart to show the SPlistItems from a different SPSite? 问题是,当列表不在我当前的SPSite上时,它似乎不起作用...除了ListViewWebPart之外,还有其他方法可以显示来自其他SPSite的SPlistItems吗?

Cross site-collection list display is not supported OOTB by SharePoint. SharePoint不支持跨站点集合列表显示。 There are workarounds with SharePoint Designer, web services, iframes, etc. But these are all hacks in my opinion. SharePoint Designer,Web服务,iframe等都有解决方法。但是我认为这些都是黑客。

I suggest to write a custom web part and display the data in a SPGridView . 我建议编写一个自定义Web部件并在SPGridView中显示数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM