简单

导航

当Person or Group字段允许多人时,通过sdk对象读取用户信息

 SPFieldUserValueCollection values = (SPFieldUserValueCollection)item["Users"];
string initUsers = "";
for (int i = 0; i < values.Count; i++)
    initUsers += (initUsers.Length > 0 ? "," : "") + values[i].User.LoginName;
    txUsers.CommaSeparatedAccounts = initUsers;
}

posted on 2008-09-15 15:45  bill chen  阅读(423)  评论(1编辑  收藏  举报