GetUserId Method

SimpleMembershipProvider.GetUserId Method

Returns the ID for a user based on the specified user name.

Namespace:  WebMatrix.WebData
Assembly:  WebMatrix.WebData (in WebMatrix.WebData.dll)

'Declaration
Public Function GetUserId ( _
	userName As String _
) As Integer
'Usage
Dim instance As SimpleMembershipProvider 
Dim userName As String 
Dim returnValue As Integer 

returnValue = instance.GetUserId(userName)

Parameters

userName
Type: System.String
The user name.

Return Value

Type: System.Int32
The user ID.

ExceptionCondition
InvalidOperationException

The SimpleMembershipProvider class was not initialized using a call to the InitializeDatabaseConnection method.

Show:
© 2016 Microsoft