I have written some C# code which will recycle a folder based on the path it is passed, however, when it is executed the folder goes to the SiteCollection recycling bin and not the first level recycling bin for the team site.
SPFolder folder = web.GetFolder(folderPath);
if (folder.Exists)
{
web.AllowUnsafeUpdates = true;
folder.Recycle();
folder.Update();
web.AllowUnsafeUpdates = false;
}
How do i send the folder to the team site recycling bin and not the site collection? Thanks in advance!