1. Open the Site collection (SPSite)
2. Enumerate throuh all sites (SPSite.AllWebs -> SPWeb)
3. Enumerate through all lists (SPWeb.Lists)
4. Locate the lists you want to hide (base on Title or other property)
5. Set the Hidden Property to true
6. Call SPList.Update() (important!)
1 回答
SPList类有一个隐藏属性,可以完全按照您的意愿执行 .
简而言之,你可以这样做: