The Ribbon Tab with id: "Ribbon.Read" has not been made available for this page or does not exist. Use Ribbon.MakeTabAvailable(). at Microsoft.Web.CommandUI.Ribbon.Render(HtmlTextWriter writer) at Microsoft.SharePoint.WebControls.SPRibbon.Render(HtmlTextWriter writer)
Add this code in the webpart:
Page currentPage =
this
.Page;
SPRibbon ribbon = SPRibbon.GetCurrent(
this
.Page);
SPContext context = SPContext.Current;
ribbon.MakeTabAvailable(SPRibbon.ReadTabId);
Add the Windows.Web.CommandUI dll reference.
Enjoy.
Comments
Post a Comment