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 want to add contextual tab. Using farm solution i am able to add contextual webpart

this is my code using that i am able to add contextual Tab in farm solution


in sandbox solution this code not working because SPRibbon class not working.

Is that any other way to add contextual tab in sandbox solution

reply me fast,It's fast

share|improve this question

The SPRibbon class isn't available in a sandboxed solution, because the sandboxed solution doesn't has access to the Microsoft.SharePoint.WebControls namspace.

The way to interact with the server ribbon in a sandboxed solution is by using a page component (ECMA script). Here is a link to an example on MSDN:

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.