Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sharepoint 2010 在Sharepoint 2010中自定义SocialCommentControl_Sharepoint 2010_Comments_Social - Fatal编程技术网

Sharepoint 2010 在Sharepoint 2010中自定义SocialCommentControl

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内部属性。但在评论时,评论仍然与当前页面背道而驰 任何人做过这个之前,请让

我试图复制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));
            }