SimpleMembershipProvider.GetUserId(String) Method

Definition

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

public int GetUserId (string userName);
member this.GetUserId : string -> int
Public Function GetUserId (userName As String) As Integer

Parameters

userName
String

The user name.

Returns

The user ID.

Exceptions

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

Applies to