UserManager<TUser, TKey>.SetPhoneNumberAsync Method

Sets a user phone number.

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

Syntax

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

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

Parameters

  • userId
    Type: TKey
    The user ID.

Return Value

Type: System.Threading.Tasks.Task<IdentityResult>
The task representing the asynchronous operation.

See Also

Reference

UserManager<TUser, TKey> Class

Microsoft.AspNet.Identity Namespace

Other Resources

ASP.NET Identity