Documentation for: ASP.NET Ajax Version 1.0

This documentation is for a previous version. For the current released version, see the ASP.NET Ajax documentation on MSDN.

 

 

 

 

 

 

 

Sys.Services ProfileService load Method

Loads the specified profile properties.

Syntax

Sys.Services.ProfileService.load(propertyNames, loadCompletedCallback, failedCallback, userContext);

Parameter

Description

propertyNames

A string array that contains the profile properties to load.

loadCompletedCallback

The function that is called when loading has completed. The default is null.

failedCallback

The function that is called when loading has failed. The default is null.

userContext

User context information passed to the callback functions.

Remarks

If propertyNames is not supplied, all profile properties enabled for read access are loaded from the server. The loaded profile can then be accessed directly from the properties field. This enables your application to access the profile properties by using simple field syntax, as shown in the following example:

Sys.Services.ProfileService.properties.FieldName;

If the call to the profile service fails, the function specified in the defaultFailedCallback property is called. If the call succeeds, the function specified in the defaultLoadCompletedCallback property is called.

Example

The following example shows how to use the load method to load the profile for the currently authenticated user. This code is part of a complete example found in the Sys.Services.ProfileService class overview.

javascript

	Sys.Services.ProfileService.load(null, 
	    OnLoadCompleted, OnProfileFailed, null);