ProfileBase.UserName Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the user name for the profile.

Namespace:   System.Web.Profile
Assembly:  System.Web (in System.Web.dll)

public string UserName { get; }

Property Value

Type: System.String

The user name for the profile or the anonymous-user identifier assigned to the profile.

The UserName property returns either the name of the authenticated user that the profile is associated with or the anonymous user identifier assigned to the profile if the IsAnonymous property is true.

Anonymous access to the user profile is enabled using the configuration section and the allowAnonymous attribute of the configuration element used to specify profile properties.

.NET Framework
Available since 2.0
Return to top
Show: