3

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

1

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

0

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, privacy policy and cookie policy

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