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

Can you please help me in order to add a button at Page tab in publishing page. I am able to add the button in the documents library but I am not able to add the button at Page tab.

Here is the XML which I am using for the same:

    <CommandUIDefinition Location="Ribbon.Page.Manage.Controls._children">
      <Button Id="NewUIRibbonControl.EnableRating"
              LabelText="Enable Rating"
  <CommandUIHandlers >
    <CommandUIHandler Command="EnableRating"

And also how to call C# function from here. Instead of alert I want to call a C# function.

Please let me know what's wrong there.


share|improve this question
up vote 2 down vote accepted

I think your Location property is wrong. Depending on your settings and page layout correct location for Page tab is Ribbon.WikiPageTab or Ribbon.WebPartPage. There is no tab defined as Ribbon.Page in \14\TEMPLATE\GLOBAL\XML\CMDUI.XML

You can easily check id of any tab if you use IE with Developing Tools or FireFox with FireBug to explore ribbon markup.

Example of ribbon markup - search for id of ul tag (it is Ribbon.WikiPageTab):

<div unselectable="on" class="ms-cui-tabContainer ">
    <ul unselectable="on" class="ms-cui-tabBody" id="Ribbon.WikiPageTab" role="tabpanel" aria-labelledby="Ribbon.WikiPageTab-title">
    <li unselectable="on" class="ms-cui-group" id="Ribbon.WikiPageTab.EditAndCheckout">
        <span unselectable="on" class="ms-cui-groupContainer">

Only possible solution to call C# function from ribbon is through postback. I think it would be difficult to apply this technique on publishing page. Here is article on MSDN blogs on how to do it inside webpart: Implementing a post back button in a SharePoint 2010 Web Part with contextual ribbon

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.