Security. Is Current User(String) Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a value that indicates whether the user name of the logged-in user matches the specified user name.
public static bool IsCurrentUser (string userName);
static member IsCurrentUser : string -> bool
Public Shared Function IsCurrentUser (userName As String) As Boolean
The user name to compare the logged-in user name to.
true if the logged-in user name matches
userName; otherwise, false.
The Initialize(String, NameValueCollection) method was not called.-or-The InitializeDatabaseConnection method was not called.-or-The SimpleMembershipProvider membership provider is not registered in the configuration of your site. For more information, contact your site's system administrator.