您的位置:首页 > 移动开发

使用SharePoint 人员选择控件 在 WEB APP开发

2011-04-21 14:11 375 查看
首先 引用名字空间呗

<%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
然后在页面上面添加

<wssawc:PeopleEditor
AllowEmpty="false"
ValidatorEnabled="true"
id="userPicker"
runat="server"
ShowCreateButtonInActiveDirectoryAccountCreationMode="true"
SelectionSet="User" />

进入后台页面

using Microsoft.SharePoint.WebControls;
public class MyPageName : Page
{
protected PeopleEditor userPicker;

}

最后通过

public void btnSave_Click(object sender, System.EventArgs e)
{
….
PickerEntity pe = (PickerEntity)userPicker.Entities[0]; //gets first user in list
string username = pe.Description;

}

来获取 value

if ($ != jQuery) {
$ = jQuery.noConflict();
}
var isLogined = true;
var cb_blogId = 27201;
var cb_entryId = 1873818;
var cb_blogApp = "wanghao-3";
var cb_blogUserGuid = "5d763d0b-63cf-dd11-9e4d-001cf0cd104b";
var cb_entryCreatedDate = '2010/11/10 15:36:00';
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: