Sharepoint 2010 在Sharepoint 2010中自定义SocialCommentControl
我试图复制Social Collaboration>Note Board web部件提供的功能,但我希望能够对当前正在查看的列表项进行评论,而不是对当前页面进行评论。 通过从查询字符串中获取项id在web部件上呈现的列表项。例如: 我试着嵌入 SharePointPortalControl:SocialCommentControl id=CommentControl runat=server 控件,并使用反射设置其Url内部属性。但在评论时,评论仍然与当前页面背道而驰 任何人做过这个之前,请让我知道,如果有一个方法来实现这个功能Sharepoint 2010 在Sharepoint 2010中自定义SocialCommentControl,sharepoint-2010,comments,social,Sharepoint 2010,Comments,Social,我试图复制Social Collaboration>Note Board web部件提供的功能,但我希望能够对当前正在查看的列表项进行评论,而不是对当前页面进行评论。 通过从查询字符串中获取项id在web部件上呈现的列表项。例如: 我试着嵌入 SharePointPortalControl:SocialCommentControl id=CommentControl runat=server 控件,并使用反射设置其Url内部属性。但在评论时,评论仍然与当前页面背道而驰 任何人做过这个之前,请让
谢谢。重新确认了comment控件执行表单回发,我没有在回发上设置Url。一旦我移动了我的数据绑定代码,它就发生在回发时,注释也开始工作 标记:
<SharePointPortalControls:SocialCommentControl ID="comments" runat="server" />
SocialCommentControl commentsControl = (SocialCommentControl) e.Item.FindControl("comments");
if (commentsControl != null)
{
commentsControl.SetProperty("AllowNewComment", true);
commentsControl.SetProperty("DisplayItems", 5);
commentsControl.SetProperty("Uri", new Uri(itemUrl));
}