SharePoint 列值包含额外的 ;# 字符
这个错误会干扰我的 Silverlight 2.0 控件的数据输出。例如,当用户从 SharePoint 2007 列字段个人或组中选择用户时,输出将显示为:
9;#Carol
或string; #4/8/2011
(列字段日期和时间)
我如何消除传入的额外字符?
修补程序也没有多大帮助。
There's this bug that interferes with the output of data at my Silverlight 2.0 control. When users for eg., select a user from a SharePoint 2007 column field Person or Group, the output will be displayed as:
9;#Carol
orstring;#4/8/2011
(column field Date and Time)
How may I eliminate the additional characters passed in then?
Hotfixes didn't help much either.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
;#
是 SharePoint 的数据分隔符。它类似于逗号分隔值 (CSV) 文件中的逗号。您需要手动解析数据:对于
Person or Group
字段,9
是用户的用户 ID。the
;#
is SharePoint's data separator. Its similar to a comma in a Comma Separated Values (CSV) file. You'll need to parse the data manually:In the case of the
Person or Group
field, the9
is the User ID of the user.原来问题出在我的源代码上,只需将其编辑为以下内容即可:
Turns out that the problem lies with my source code, just edit it to the following:
您不应该使用
split
函数。您应该使用SPFieldUserValue
,如本文所示http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/94c04deb-c7d1-426f-bb2f-5c894457e2b6/
You should not use
split
function. You should useSPFieldUserValue
as shown in this posthttp://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/94c04deb-c7d1-426f-bb2f-5c894457e2b6/