Export (0) Print
Expand All

ProfilePropertySettings Class

The ProfilePropertySettings class provides a way to programmatically access and modify the profiles section of a configuration file. This class cannot be inherited.

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

'Declaration
Public NotInheritable Class ProfilePropertySettings
	Inherits ConfigurationElement
'Usage
Dim instance As ProfilePropertySettings

public final class ProfilePropertySettings extends ConfigurationElement
public final class ProfilePropertySettings extends ConfigurationElement
Not applicable.

The ProfilePropertySettings class provides a way to programmatically create, access, and modify the definition of an individual property added to the properties subsection of the profile section of a configuration file.

The profile section of the configuration file specifies a schema for user profiles. At run time, the ASP.NET compilation system uses the information specified in the profile section to generate a class called ProfileCommon, which is derived from ProfileBase. The ProfileCommon class definition is based on the properties defined in the properties subsection of the profile section of the configuration file. An instance of this class is created for each user profile, and you can access the individual profile values in your code through the HttpContext.Profile property. For more information about profile properties, see Understanding ASP.NET Profile Properties. For more information about the profile features added to ASP.NET 2.0, see ASP.NET Profile Properties.

The following code example shows how to access the PropertySettings property value, which contains a collection of ProfilePropertySettings objects. This code example is part of a larger example provided for the ProfileSection class.

' Display all current root ProfilePropertySettings.
Console.WriteLine("Current Root ProfilePropertySettings:")
Dim rootPPSCtr As Integer = 0
For Each rootPPS As ProfilePropertySettings In profileSection.PropertySettings
    Console.WriteLine("  {0}: ProfilePropertySetting '{1}'", ++rootPPSCtr, _
        rootPPS.Name)
Next

System.Object
   System.Configuration.ConfigurationElement
    System.Web.Configuration.ProfilePropertySettings

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft