Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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!

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

 
discard

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

Browse other questions tagged or ask your own question.