ProfileSettings.Name 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 or sets the name of the ProfileSettings object.

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

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

Property Value

Type: System.String

The name of the ProfileSettings object. The default is an empty string("").

A unique name is required. Duplicate names may result in a loss of data when the configuration section is saved.

The following code example shows how to use the Name property. This code example is part of a larger example provided for the HealthMonitoringSection class.

profileSetting.Name = "Custom";

.NET Framework
Available since 2.0
Return to top
Show: