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 save Method

Saves the specified profile properties.

Syntax

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

Parameter

Description

propertyNames

A string array that contains the profile properties to save.

saveCompletedCallback

The function that is called when the save method has finished. The default is null.

failedCallback

The function that is called if the save method has failed. The default is null.

userContext

User context information passed to the callback functions.

Remarks

If propertyNames is not supplied, all profile properties are sent to the server. The loaded profile can then be assigned 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 = "value";

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

Example

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

javascript

	Sys.Services.ProfileService.save(null, 
	    OnSaveCompleted, OnProfileFailed, null);