For a list with many views, and some are for background operations and the user does not need to see. Is there a way to prevent some views from displaying in the browser drop down?
You can do it with couples of ways.
Method # 1, you can do from list setting page.
- Enable the MetaData Navigation and Filtering
site feature from site settings > Site actions > Manage Site Features
- Now go the List Setting page
- you will see the "per-location view settings" link.
- Click on it and remove the All the views which you don't want to display in the drop down.
Click Ok. and test it.
One thing keep in mind, even you hide this but still if somebody know the URL of the view can browse it directly typing URL in the browser.
Another Method is Using the Powershell as other folks responded.
SPList list = site.Lists.TryGetList("Sample"); SPView view = list.Views["SampleView"]; view.Hidden = true; view.Update();