在aspx.cs代码中检索当前Sharepoint用户

本文关键字:Sharepoint 用户 检索 aspx cs 代码 | 更新日期: 2023-09-27 18:08:08

我创建了一个在Sharepoint 2010中加载的web应用程序。我在Visual Studio 2010中使用aspx和aspx.cs创建了web部件。这些表单是用来获取数据的,这些数据被加载到Microsoft Server数据库中。

我想检索登录到Sharepoint以在数据库中加载为创建记录的人的用户。有人能告诉我怎么做吗?

在aspx.cs代码中检索当前Sharepoint用户

如果你想使用sharepoint设计器,你可以这样做:http://blogs.msdn.com/b/joshuag/archive/2008/06/03/getting-the-current-user-name-or-id-in-sharepoint-using-sharepoint-designer-no-code.aspx