Click here to Skip to main content
15,299,850 members
Articles / Web Development / ASP.NET
Posted 12 Feb 2009

Tagged as


14 bookmarked

How to: Hide the Actions Menu in SharePoint

Rate me:
Please Sign up or sign in to vote.
3.67/5 (2 votes)
12 Feb 2009CPOL
This article shows you how to hide the "Actions Menu" in SharePoint; and more generally, how to security trim your SharePoint pages.


The article shows you have to hide or show the "Actions Menu" depending on the permissions of the current user; i.e., how to security trim your SharePoint pages. You do this by using the Sharepoint:SPSecurityTrimmedControl.


I had to give my read-only users the site-level permission "Edit Personal User Information". However, giving them this permission turned on the "Site Actions" menu displaying the "View all site content" menu item. To resolve thism I wrapped the PublishingSiteAction:SiteActionMenu control in a Sharepoint:SPSecurityTrimmedControl.

Using the Code

SharePoint comes with a control for security trimming your pages, called Sharepoint:SPSecurityTrimmedControl. You can use this to hide certain elements and show certain elements depending on the permissions of the current user.

You use the control by:

  1. wrapping the control to be security trimmed with the Sharepoint:SPSecurityTrimmedControl.
  2. specifying what permissions a user can have in the Permissions property of the Sharepoint:SPSecurityTrimmedControl.
<Sharepoint:SPSecurityTrimmedControl runat="server" 
 <PublishingSiteAction:SiteActionMenu runat="server"/>

You can see the possible values that can be assigned to the Permissions property here: For more info on the SPSecurityTrimmedControl class, visit this page:


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Jakob Flygare
Web Developer
Denmark Denmark
No Biography provided

Comments and Discussions

-- There are no messages in this forum --