Show Context Tabs from Code Behind

Apr 17, 2011 at 10:44 PM

I'm using 2010 and have managed to get this working  by using...

Public Sub ShowContext(byval ContextID as string)

Manager1.AddInitScript("OfficeWebUI.Ribbon.ShowContext('" & ContextID & "')")

end sub

To show the tab replace ShowContext with ShowTab. Remember the color of the context should not be transparent and the text property should not be "" for the context to show.




Dec 29, 2011 at 1:52 PM

Thanks for this,


I have used it to maintain tab position by storing the current tab in in sassion variable. However I cannot restore it in the pre render events for each tab as they are all fired in the order that they are entered and the selected tab is therefore always the last one in the list. there appears to be no click event for each tab so my question is this...

What is the best place to restore the tab position. The only one I had 'working' was in the pre-render event of each page called from the ribbon tab. Is there no place in the master-page I can set this?