FormsAuthenticationUser.Name Property


Gets or sets the logon user name.

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

[ConfigurationPropertyAttribute("name", IsRequired = true, IsKey = true, 
	DefaultValue = "")]
public string Name { get; set; }

Property Value

Type: System.String

The logon user name required by the application.

The following code example shows how to use the Name property. Refer to the code example in the FormsAuthenticationUser class topic to learn how to get the section.

// Using the Name property.

// Get current name.
string currentName = 

// Set a new name.
formsAuthenticationUsers[0].Name = "userName";

.NET Framework
Available since 2.0
Return to top