Export (0) Print
Expand All

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)

member Item : 
        propertyName:string -> Object with get, set

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.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft