MembershipUser.ProviderName 属性

定义

获取成员资格提供程序的名称,该提供程序存储并检索成员资格用户的用户信息。Gets the name of the membership provider that stores and retrieves user information for the membership user.

public:
 virtual property System::String ^ ProviderName { System::String ^ get(); };
public virtual string ProviderName { get; }
member this.ProviderName : string
Public Overridable ReadOnly Property ProviderName As String

属性值

成员资格提供程序的名称,该提供程序存储并检索成员资格用户的用户信息。The name of the membership provider that stores and retrieves user information for the membership user.

注解

ProviderName 属性公开用于管理 MembershipUser的信息的成员资格提供程序的名称。The ProviderName property exposes the name of the membership provider that manages the information for the MembershipUser. 您可以通过使用 Membership 类的 Providers 属性访问成员资格用户的特定成员资格提供程序实例,无论该访问接口是否为该应用程序的默认提供程序。You can access the specific membership provider instance for a membership user by using the Providers property of the Membership class, whether or not the provider is the default provider for the application. 例如,你可以创建一个方法,该方法采用 MembershipUser 对象作为输入,并根据业务逻辑更新 MembershipUserFor example, you may create a method that takes a MembershipUser object as input and updates the MembershipUser based on your business logic. 可以通过从 ProviderName 属性值编制索引的 Providers 集合调用成员资格提供程序的 UpdateUser 方法来确保使用适当的成员资格提供程序来更新 MembershipUserYou can ensure that the appropriate membership provider is used to update the MembershipUser by calling the UpdateUser method of the membership provider from the Providers collection that is indexed by the ProviderName property value.

适用于

另请参阅