Take the 2-minute tour ×

I have a following requirement in SharePoint 2010.

We need to disable the "Delete Selection" menu option from the recycle bin for SharePoint members. Is there any way to achieve this?

share|improve this question

2 Answers 2

Although it is certainly possible modifying the internal /_layouts/RecycleBin.aspx page, I personally stay far away from this approach for several reasons (supportability and maintenance to name only two).


The simplest way is then to make a copy of the original page, change the copy to fit your needs and use a redirect with the DelegateControl like this:

protected override void OnLoad(EventArgs e)
    if (Context.Request.Url.PathAndQuery.IndexOf("_layouts/settings.aspx", StringComparison.InvariantCultureIgnoreCase) > 0)
        Context.Response.Redirect("MySiteSettingsPage.aspx", true);

A far more complicated approach would be to use the DelegateControl to directly manipulate the wssuc:ToolBarButton control via ASP.NET. Unfortunately I don't have a working example of this approach for you, sorry!

share|improve this answer

There are multiple ways to do this.

I couldn't find a sharepoint specific setting for this. Maybe there is one somewhere..

Anyways, Personally, I'd just edit the /_layouts/RecycleBin.aspx page and remove the button.

Create a copy of the page though before editing it.

Find the following control and add the Visible="false" Attribute :

<wssuc:ToolBarButton runat="server"
share|improve this answer

Your Answer

