开发者

Moving Data Views Across Sharepoint Sites

开发者 https://www.devze.com 2022-12-10 21:05 出处:网络
We have a production SharePoint site that uses a custom database quite a bit.We have a dev site on a separate box where we develop all of our things then move them over to a live site when they are re

We have a production SharePoint site that uses a custom database quite a bit. We have a dev site on a separate box where we develop all of our things then move them over to a live site when they are ready for our customers.

We have many pages that use data views to show information from the database. Most of the actual programmability is done with stored procedures and UDF's in the database itself. One of the problems we are having is that when we try to move these custom pages over from one site to another (even if within the same SharePoint installation), the data views become broken. As far as I can tell, the data views are associated with data connections via a GUID. We can go in and set up all of these connections by hand on the new site, however there is no option in the data view webpart to change the data view's associated connection.

At present, this pretty much pr开发者_StackOverflow社区events us from developing on a separate site at all. Doing a command-line SharePoint export/import is an all-inclusive way of accomplishing this. However, ignoring the limited options for this operation, it is at best unreliable. Our first attempts left out some of the content (like custom aspx pages). As we began to create more complex customizations on the SharePoint site, the export function stopped working altogether only to return cryptic errors.

Has anyone else found a good way to do this?


You can do the following:

  1. Create a new page on the destination sharepoint and include an empty data view
  2. copy/paste the old code into the new page
  3. Replace the webpart id of the old dataview with the new one

It worked for me, although I'm still struggling with some complex forms that use drop-down lists that lookup their values in the database depending on other fields. For that I use custom datasources and on the original site they work... but haven't had success in copying it to the new one.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号