开发者

How to create a PeopleEditor?

I am building a wi开发者_JS百科ndows application that upload documents to sharepoint document library and modify its column.

My problem is that i'm uploading a file to document libary that has a people editor column.

To solve my problem I want to pop up a windows form containing a people editor so users can pick the users or groups to fill in the column.

How can i create a people editor like the one in sharepoint?


In your asp.net page, you can have PeopleEditor control as simple as this this:

<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<SharePoint:PeopleEditor runat="server" ID="peopleEditor" 
        AutoPostBack="true" AllowEmpty="false" SelectionSet="User,SecGroup,SPGroup" 
        BorderWidth="1" PlaceButtonsUnderEntityEditor="false" Rows="1" />


You could have a read-only RichTextBox to display the names, and have a ListBox or something showing the names of people from your domain. You can use classes from the System.DirectoryServices.ActiveDirectory namespace to do Active Directory lookups. This is meant to replace the old LDAP queries that were very tedious in getting names from Active Directory. I haven't used it yet, but I hear it's pretty simple to work with.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜