Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

 SPRibbon.GetCurrent(this.Page).MakeTabAvailable("MyProject.Ribbon.HelloTab");

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
add comment

2 Answers

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

share|improve this answer
add comment

Your Answer

 
discard

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.