This documentation is archived and is not being maintained.

ProfileGroupBase::Item Property

Gets or sets a grouped profile property value indexed by the property name.

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

public:
property Object^ Item[String^ propertyName] {
	Object^ get (String^ propertyName);
	void set (String^ propertyName, Object^ value);
}

Parameters

propertyName
Type: System::String
The name of the grouped profile property.

Property Value

Type: System::Object
The value of the specified grouped profile property.

You can use this property to retrieve or set grouped property values of the user profile for your application. Returned values are typed as Object and must be cast as the specific object type when retrieved. For strongly typed access to profile property values, you can access the property by name as a member of a group of the HttpContext::Profile property, for example, Profile.Address.City.

The following code example shows an ASP.NET page that reads and sets the grouped properties specified for the user profile. For an example of a Web.config file that specifies a group of properties in the profile, see the example provided for the ProfileGroupBase class.

Security noteSecurity Note

This example contains a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: