In this post we will discuss how to prevent delete of a Sharepoint list in sharepoint 2010. So that user will not able to delete a particular list or document library. This will be same for both SharePoint list or document library.
Also you can check out my previous posts on:
We can prevent delete option in SharePoint list by using PowerShell
or through SharePoint server object model code.
Below is the PowerShell cmdlets:
$web = Get-SPWeb "http://SiteURL""
$list = $web.Lists["My Custom List"]
SharePoint object model code:
using(SPSite site = new SPSite("http://SiteURL"))
using(SPWeb web = site.OpenWeb())
SPList list = web.Lists["My Custom List"];
list.AllowDeletion = false;
By using the above approaches you can prevent user from delete the SharePoint list.