Share via


Sys.Services.ProfileGroup Class

Defines a group.

Namespace: Sys.Services

Inherits: None

var profileGroup = Sys.Services.ProfileGroup(); 

Members

Name

Description

Sys.Services.ProfileGroup Constructor

Initializes a new instance of the Sys.Services.ProfileGroup class.

Remarks

The ProfileGroup class defines the type of an element as a group in the properties collection of the Sys.Services.ProfileService class. Profile group properties are accessed as subproperties of the related group, as shown in the following ECMAScript (JavaScript) example:

var Street = 
    Sys.Services.ProfileService.properties.Address.Street;
var City = 
    Sys.Services.ProfileService.properties.Address.City;

The following example shows how to create a property group in JavaScript that is part of the properties collection. In the example, Sys.Services.ProfileService.properties.Address is of type ProfileGroup.

Sys.Services.ProfileService.properties.Address = 
    new Sys.Services.ProfileGroup();
Sys.Services.ProfileService.properties.Address.Street = 
    "street name";
Sys.Services.ProfileService.properties.Address.City = 
    "city name";
Sys.Services.ProfileService.properties.Address.State = 
    "state name";

You can also define a profile group in the Web.config file by using syntax such as the following:

<system.web>
  <profile enabled="true">
    <properties>
      <group name="Address">
        <add name="Street" type="System.String" />
        <add name="City" type="System.String" />
        <add name="PostalCode" type="System.String" />
      </group>
    </properties>
  </profile>
<system.web>

See Also

Concepts

Sys.Services.AuthenticationService Class

Sys.Services.ProfileService Class