|
Using the Save() Method
Listing 4. The ProfileService class's save() method can be used to save personalization settings back to the ASP.NET profile provider. function SaveProfile()
{
Sys.Services.ProfileService.properties.Name =
$get("txtFullName").value;
Sys.Services.ProfileService.save(null,
OnSaveCompleted, OnProfileFailed, null);
}
function OnSaveCompleted(numProperties, userContext,
methodName)
{
alert("Profile updated!");
}
function OnProfileFailed(error, userContext, methodName)
{
alert("Save failed: " + error.get_message());
}
|