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

2 Answers 2


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: http://msdn.microsoft.com/en-us/library/ff407303.aspx


Can't be done in the Sandbox I'm afraid: "It seems that contextual tabs/groups can only be made available by server-side code, and note also that SPRibbon is not available in the sandbox." (about 1/3 of the way through the post.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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