zoukankan      html  css  js  c++  java
  • 使用SharePoint 人员选择控件 在 WEB APP开发

     

    首先 引用名字空间呗

    <%@ 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

  • 相关阅读:
    UML序列图
    接口初探
    Discuz初探
    Vim指令学习
    UCenter Home代码研读之space.php
    建站须知
    linux指令之文件的创建、查询、修改
    InitPHP初探
    php环境搭建
    Zend Framework学习之Zend_Db 数据库操作
  • 原文地址:https://www.cnblogs.com/IsNull/p/1913004.html
Copyright © 2011-2022 走看看