6
코드별로 SharePoint의 특정 그룹에있는 모든 사용자의 목록을 가져 오는 방법은 무엇입니까?SharePoint의 모든 사용자 목록을 얻는 방법
코드별로 SharePoint의 특정 그룹에있는 모든 사용자의 목록을 가져 오는 방법은 무엇입니까?SharePoint의 모든 사용자 목록을 얻는 방법
나는이 첫 줄을 대신 사용했습니다. 고마워 젠장 :
SPGroupCollection collGroups = SPContext.Current.Web.Groups;
foreach (SPGroup oGroup in collGroups)
{
foreach (SPUser oUser in oGroup.Users)
{
Response.Write(oUser.Name);
Label l = new Label();
l.Text = oUser.Name;
PlaceHolderContents.Controls.Add(l);
PlaceHolderContents.Controls.Add(new LiteralControl("<br/>"));
}
}
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);
}
}
}
고마워하지만이 오류가 발생합니다. "http : // kermit : 91/ExternalFAQ/default.aspx"에 ':'라는 잘못된 문자가 포함되어 있습니다. "Website_URL"대신 무엇을 써야합니까 ?? –