Using the SharePoint ‘Person or Group’ field in code
string Users = string.Empty;
foreach (string survueygroupname in Groupname)
{
SPGroup ogrp = oWeb.Groups[survueygroupname];
Users += ogrp.ID.ToString() + ";#" + ogrp.Name.ToString() + ";#";
}
if (Users.EndsWith(";#"))
{
Users = Users.Substring(0, Users.Length - 2);
}
oListItem["Survey Attendees Group"] = Users;
Comments
Post a Comment