Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要从我的自定义 webpart 中获取主站点 url。有什么编程方法可以做到吗?
尝试 :
SPWeb currentWeb = SPContext.Current.Web; SPWeb rootWeb = currentWeb.Site.RootWeb;