MembershipUser.ProviderUserKey 属性

定义

从用户的成员身份数据源中获取用户标识符。Gets the user identifier from the membership data source for the user.

public:
 virtual property System::Object ^ ProviderUserKey { System::Object ^ get(); };
public virtual object ProviderUserKey { get; }
member this.ProviderUserKey : obj
Public Overridable ReadOnly Property ProviderUserKey As Object

属性值

用户的成员身份数据源中的用户标识符。The user identifier from the membership data source for the user.

注解

ProviderUserKey 属性从类型化为 object的成员资格数据源中公开标识符。The ProviderUserKey property exposes the identifier from the membership data source typed as object. 标识符的类型取决于 MembershipProviderMembershipUserThe type of the identifier depends on the MembershipProvider or the MembershipUser. 如果是 SqlMembershipProvider,则可以将 ProviderUserKey 转换为 Guid,因为 SqlMembershipProvider 将用户标识符存储为 UniqueIdentifierIn the case of the SqlMembershipProvider, the ProviderUserKey can be cast as a Guid, since the SqlMembershipProvider stores the user identifier as a UniqueIdentifier.

适用于

另请参阅