Wonder how to hide ribbon from any SharePoint page if you wish to. If you have an access on the page and if you have placed a web part on it, then this is the way to hide ribbon.
It’s one simple line of code that does the magic. I am writing it in button click just to demonstrate you.
And you write a code on button.
SPRibbon.GetCurrent(this.Page).CommandUIVisible = false;
Click the button. And you are done.
No comments:
Post a Comment