ProfileBase::Properties Property
Gets a collection of SettingsProperty objects for each property in the profile.
Assembly: System.Web (in System.Web.dll)
public: static property SettingsPropertyCollection^ Properties { SettingsPropertyCollection^ get (); }
Property Value
Type: System.Configuration::SettingsPropertyCollectionA SettingsPropertyCollection of SettingsProperty objects for each property in the profile for the application.
| Exception | Condition |
|---|---|
| System.Configuration::ConfigurationErrorsException | A property type specified in the profile section of the Web.config file could not be created. -or- The allowAnonymous attribute for a property in the profile section of the Web.config file is set to true and the enabled attribute of the anonymousIdentification element is set to false. -or- The serializeAs attribute for a property in the profile section of the Web.config file is set to Binary and the IsSerializable property of the specified type returns false. -or- The name of a provider specified using the provider attribute of a profile property could not be found in the Providers collection. -or- The type specified for a profile property could not be found. -or- A profile property was specified with a name that matches a property name on the base class specified in the inherits attribute of the profile section. |
You can use this property to get information about the profile properties configured for an application, including property names and types. You can also reference the ProfileProvider of each property. A ProfileProvider manages storage and retrieval of property values to and from the data source.
The following code example lists the names of the properties in the user profile by binding the Name property from the static Properties collection of SettingsProperty objects to a GridView control. The selected property value is retrieved by name using the Item collection. For an example of a Web.config file that specifies properties for the user profile, see the example provided for the ProfileBase class.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.