SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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;
                                web.AllowUnsafeUpdates = false;

How do i send the folder to the team site recycling bin and not the site collection? Thanks in advance!

share|improve this question
The code listed will put the folder in the recycle bin for the web (and in the end user site collection recycle bin) – Per Jakobsen Oct 3 '12 at 19:41
When i check the team site recycle bin the items do not show up, they do, however, show up in the parent site collection recycling bin. – ps_md Oct 3 '12 at 19:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.