共用方式為


Sys.Services.ProfileService Constructor

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

public function ProfileService()

Remarks

You can access the loaded profile data directly from the properties field.

Note

An element in the properties field can be a property group of type Sys.Services.ProfileGroup. If it is, the related properties appear as subproperties. For more information, see Sys.Services.ProfileGroup Class.

Code Example

The following example shows how to use the properties field to access the currently authenticated user's profile data. This code is part of a complete example found in the Sys.Services.ProfileGroup class overview.

  Sys.Services.ProfileService.properties.Backgroundcolor = 
        GetElementById("bgcolor").value;
    
    Sys.Services.ProfileService.properties.Foregroundcolor =
        GetElementById("fgcolor").value;