Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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)

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

returnValue = instance.GetUserId(userName)


Type: System.String
The user name.

Return Value

Type: System.Int32
The user ID.


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

  • Medium trust for the immediate caller. This member can be used by partially trusted code.
© 2015 Microsoft