Hi All,
In my application i got the requirenent to move the sites present in one site collection oter site collecton. can any one help how to achive this using c sharp code or any other ways to get this.
Thanks in Advance
Mastan.sheik
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amaresh ReddyPosted Oct 18, 2012, 3:12 AM
To move the sites from one site collection to any other site collection. These are the following ways
1. Using Sharepoint 2010 Power shell you can export and import all the sites
Command : Export-SPWeb -Identity "http://xxxxxxxxx" -Path "C:\backupfilename.bak"
Command : Import-SPWeb -Identity "http://xxxxxxxxx" -Path "C:\backupfilename.bak"
2. Download the site template required.
In the site settings -> Save Site As Template -> The site will be stored in solution gallery as WSP.
Download the WSP from the current site collection and upload the WSP in to the required site collection. The template will be shown in new site creation. Create new sites using the template with content.
Yours
Amaresh Reddy
Amaresh ReddyPosted Nov 8, 2012, 12:46 AM
You can export and import the sites programmatically. The following are the objects to export and import using c#
SPExport - It will export the site to a location.
SPImport - It will import the site from a location
Regards
Amaresh
Mastan SheikPosted Oct 18, 2012, 6:39 AM
please let me know is there any way to excute these poweshell commands using C# code.