如何通过代码获取SharePoint中特定组中所有用户的列表?
最佳答案
using (SPWeb oWebsite = SPContext.Current.Site.OpenWeb("Website_URL"))
{
SPGroupCollection collGroups = oWebsite.Groups;
foreach (SPGroup oGroup in collGroups)
{
foreach(SPUser oUser in oGroup.Users)
{
Response.Write(oUser.Name);
}
}
}
关于c# - 如何获取SharePoint中所有用户的列表,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/1266382/