共用方式為


SPWeb.CurrentUser property

取得網站的目前使用者。

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public ReadOnly Property CurrentUser As SPUser
    Get
'用途
Dim instance As SPWeb
Dim value As SPUser

value = instance.CurrentUser
public SPUser CurrentUser { get; }

Property value

Type: Microsoft.SharePoint.SPUser
SPUser 物件,表示目前的使用者。

請參閱

參照

SPWeb class

SPWeb members

Microsoft.SharePoint namespace