如何将用户的个人信息,如部门,显示在页面上呢?

使用SPD打开页面,可以是母版页和布局页面。

1.引入DLL

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

<%@ Register tagprefix="SPSWC" namespace="Microsoft.SharePoint.Portal.WebControls" assembly="Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

 

2.引用Profile Property Loader

<SPSWC:ProfilePropertyLoader runat="server" />

3.在具体的需要放的位置放上具体的属性,如:部门

<SPSWC:ProfilePropertyDisplayName runat=server />
<SPSWC:ProfilePropertyValue runat=server />

Department可以换成其他的属性,如“PreferredName”是显示名。

另<SPSWC:ProfilePropertyImage runat=server /> 是放个人图片的。

相关文章: