2011-10-27 2 views
0

Social Collaboration> 노트 게시 웹 파트에서 제공하는 기능을 복제하려고 시도하고 있지만 현재 페이지에 대한 의견을 작성하는 대신 현재보고있는 목록 항목에 대해 의견을 말하고 싶습니다. 쿼리 문자열에서 항목 ID를 가져 와서 웹 파트에 렌더링 된 목록 항목입니다. 예를 들면 :는 WebPart에 SocialCommentControl 자료 = "CommentControl"RUNAT = "서버"Sharepoint 2010에서 SocialCommentControl 사용자 정의

제어 및 반사를 사용하여 URL (내부 속성) 설정 : http://my-site/Pages/default.aspx?ItemId=6dfb7b80-81AA-4e1d-9ba0-4c8c0819c14e&

I는

sharepointportalcontrols 매립 시도. 그러나 코멘트를 주석으로 달 때 여전히 현재 페이지를 상대로 갈 것입니다.

누구나이 작업을 수행하기 전에이 기능을 수행 할 수있는 방법이 있는지 알려 주시기 바랍니다.

감사합니다.

답변

0

코멘트 컨트롤이 양식 포스트를 다시 작성하고 Postrback에 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)); 
      } 
관련 문제