SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to add a new action button in the Site Actions menu for my site.

If I do this without a custom WebControl, it works, using an Element.xml file. However, I cannot get this to work with a WebControl, as I need to place it just above the New Page item.

My Elements.xml file

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="">

My WebControl class

namespace BlueRing.SharePoint
    public class NewProject
        : WebControl
        protected override void CreateChildControls()
            MenuItemTemplate item = new MenuItemTemplate();
            item.Text = "New Project";
            item.Description = "Creates a new Project site";
            item.ImageUrl = "/_layouts/images/BlueRing/projecticon.png";
            item.MenuGroupId = 200;
            item.Sequence = 201;
            item.ClientOnClickScript = "removed for legibility";

When I deploy my feature and activate it, the menu item is not visible. I followed this example to the T, but still nothing.

share|improve this question

Resolved this, must be deployed via a Module and not a blank Elements.xml file.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.