Question

I need to remove the SharePoint yellow bar notification message for specific document library using C#. I know we can achieve by using CSS as mentioned here

I am wondering is there has any way to achieve this by disabling some property using c# or PowerShell.

Was it helpful?

Solution

what you have described as "yellow bar notification" is called Status bar

The Status bar can't be disabled or enabled using C# or Powershell Because it's not a Server Side property, it's JS SP.UI.Status class that defined in SP.Js / SP.Debug.Js


The alternative solutions to remove/disable the Status bar:

  1. Using JS

    • Remove a specific Status Bar

       SP.UI.Status.removeStatus(StatusBarID);
      
    • Remove all Status Bar

       SP.UI.Status.removeAllStatus(true); 
      
  2. Using CSS

    #StatusBarID
     {
       display:none !important
     }
    

Check also How to use Status Bar in SharePoint 2010?

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top