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 defaultFailedCallback Property

Gets or sets the name of the default failure callback function.

note

To get or set property values for client API properties, you must call property accessor methods that are named with the get_ and set_ prefixes. For example, to get or set a value for a property such as cancel, you call the get_cancel or set_cancel methods.

Syntax

Sys.Services.ProfileService.set_defaultFailedCallback(value); 
var defaultFailedCallback =
  Sys.Services.ProfileService.get_defaultFailedCallback();

Parameter

Description

value

A string that contains the name of the default failure callback function.

Remarks

The function specified in this property is used as the default callback function when the profile service fails. You can override this default callback function by passing the name of a different function to the load or to the save methods.

When implementing this callback function, you must use the following signature:

function FailedComplete(error, userContext, methodName)

The parameters passed to the callback function have the following meaning:

  • error. Contains an instance of the WebServiceError class.

  • userContext. User context information that you are passing to the load or save methods.

  • methodName. The name of the calling method.

The callback function is called asynchronously if the profile service fails.

Example

The following example shows how to use the defaultFailedCallback property. This code is part of a complete example found in the Sys.Services.ProfileService class overview.

javascript

// Set default failed callback function.
Sys.Services.ProfileService.set_defaultFailedCallback(OnProfileFailed);

 // Get default failed callback function.
var defaultFailedCallback =
    Sys.Services.ProfileService.get_defaultFailedCallback();