Moving Items

Moving Items

C# Web Control Code

Sitecore.Data.Database db = Sitecore.Configuration.Factory.GetDatabase("SitecoreDB");

Sitecore.Data.Items.Item item = db.GetItem("olditempath");

//Sitecore.Data.Items.Item newcontainer = db.GetItem(Sitecore.ItemIDs.ContentRoot);

Sitecore.Data.Items.Item newparent = db.GetItem(newparentpath);

item.MoveTo(newparent);