Modify GUID when copying ASPX pages

Apr 23, 2010 at 9:38 AM

Hi Chris and others,

I have a single Site Collection with 2 sub-sites: "dev" and "real". "real" was created by saving "dev" as a site template (.stp) and creating a new site from this template.

In the site, there is a document library called "app-pages" which has a number of .aspx files which use Data View Web Parts to display contents of a List in the site.

I have updated one .aspx file in the "dev" site and wish to update the same file in the "real" site. I was perfectly able to export the individual file from "dev". I chose to "exclude dependencies". I was able to import this file into the "real" site, but the DVWP on this page does not work because the GUIDs of the Lists are still the same as the file in the "dev" site.

Is there a way that I can ensure that all List GUIDs in ASPX pages will be updated to the correct GUID for the Lists in the site that I am importing to? If not, can anyone let me know what my options are - e.g. is there another solution that will do this? I can't use the "retain object ID" option because a) the 2 sites already have different GUIDs for their Lists and b) I couldn't do this originally because the sites are in the same site collection and there cannot be multiple Lists with the same GUID.

Many thanks,

Jun 25, 2010 at 1:16 PM

I've also hit this problem. Didyou find a way around this?


Does anyone know what should be done here?

Jun 27, 2010 at 10:20 PM

Hi jonojones78,

No and Yes.

No I didn't find a solution to the immediate problem about modifying the GUID when copying an ASPX page.

Yes I did find a solution that allows ASPX pages to be moved around from site to site and for the List's Name to be used rather than the GUID:

The solution does require modifying the DVWPs to reference the List Name instead of its GUID, but once this is done, it can be copied around with no problems.