Preventing the deletion of a folder in SharePoint 2010 using C# and Visual Studio

This project has custom C# code that prevents the deletion of a folder from a SharePoint 2010 list. This project also redirects the user to a custom error page if the “Expires” field is left blank. It was created in Visual Studio 2008. This is deployed as a farm solution.

EventReciever1 is for the prevented deletion of the folder
EventReciever2 is for the prevention of an empty expireation date
I tried to contain the the event that prevents and empty expiration date in the same event that prevents folder deletion but could not. So that is why I created EventReciever2 and it worked fine.

Download package here

Leave a Reply

Your email address will not be published. Required fields are marked *