UserManager<TUser>.AddPasswordAsync Method

Add a user password only if one does not already exist

Namespace:  Microsoft.AspNet.Identity
Assembly:  Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)

Syntax

'Declaration
Public Overridable Function AddPasswordAsync ( _
    userId As String, _
    password As String _
) As Task(Of IdentityResult)
'Usage
Dim instance As UserManager 
Dim userId As String 
Dim password As String 
Dim returnValue As Task(Of IdentityResult)

returnValue = instance.AddPasswordAsync(userId, _
    password)
public virtual Task<IdentityResult> AddPasswordAsync(
    string userId,
    string password
)
public:
virtual Task<IdentityResult^>^ AddPasswordAsync(
    String^ userId, 
    String^ password
)
abstract AddPasswordAsync : 
        userId:string * 
        password:string -> Task<IdentityResult> 
override AddPasswordAsync : 
        userId:string * 
        password:string -> Task<IdentityResult> 
public function AddPasswordAsync(
    userId : String, 
    password : String
) : Task<IdentityResult>

Parameters

Return Value

Type: System.Threading.Tasks.Task<IdentityResult>

See Also

Reference

UserManager<TUser> Class

Microsoft.AspNet.Identity Namespace