0
我在我的Newform.aspx中有一个PeoplePicker字段,我想在该域中选择该域的用户名并在另一个字段中更新。sharepoint新窗体获取域用户名从人选择器
我认为有一些问题,而使用如下:
strUser = properties.AfterProperties["PeoplePicker"].ToString();
web.AllowUnsafeUpdates = true;
SPUser spUser = web.EnsureUser(strUser);
spUser = spUser.LoginName; \\This returns Domain\Username
if (properties.AfterProperties["PeoplePicker"] != null)
{
properties.AfterProperties["AnotherField"] = spUser;
}
你能提供更多信息吗? spUser prolly是typeof字符串,AnotherField属性呢?任何调试信息? – YvesR 2011-06-08 07:16:07
@YvesR当我从单行文本中获取信息时,它在AnotherField中更新正常,但不会从peoplePicker..i认为在从PeoplePicker获取数据后,我必须转换为其他格式 – jam 2011-06-08 07:31:27