Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Hide ribbon on custom page via code

$
0
0

I would like to hide ribbon on my custom forms (so users cannot use the default save function...). I used the following code in Page_Load event in SharePoint 2010. It did the job.

//hide ribbon 

SPRibbon ribbon = SPRibbon.GetCurrent(Page);

ribbon.CommandUIVisible = false;

Now I am working in SharePoint 2013. These codes seems unable to hide the ribbon?

I will appreicate your help.



Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>