Quantcast
Channel: shopSharepoint.com: Blog
Viewing all articles
Browse latest Browse all 80

How to hide a ribbon in the sharepoint page?

$
0
0
If you are wondering how to hide a ribbon control in the sharepoint page, it's as simple as a one liner code. Lets use a button click event and Hide the ribbon - 

SPRibbon.GetCurrent(this.Page).CommandUIVisible = false; 

 
You might be wondering on what scenario you want to do this. Lets say you want to show a preview of a particular page which shouldnt be editable even though if they have ediatble privilege, this could be a idea solution.

Note: I won't recommend doing this unless it's an absolute need. Good Luck!



Viewing all articles
Browse latest Browse all 80

Trending Articles