Share via


Save Method (WPSC)

Applies to: SharePoint Foundation 2010

Saves a new or modified property to the SharePoint database.

Save(Async, CallBackFunction);

Parameters

Parameter

Description

Async

Boolean value that tells the function how to save. If false, CallBackFunction is not called until the server is finished processing the save request. If true, it is called right away and the save request processes in the background on the server.

CallBackFunction(Boolean bSucceeded, string strExceptionMessage) 

A reference to the function to call when the save request is complete.

Remarks

If you specify CallBackFunction, it will get passed two parameters. The first parameter is a Boolean value, which is true if the save succeeds and false if the save fails. The second parameter is a string that contains the exception text passed down from the server if the save fails. If the save succeeds, or no exception message is passed from the server, it is set to an empty string.

Example 1: Microsoft Visual Basic Scripting Edition

Code

WPSC.Save true, GetRef(myResultFunction)

Example 2: Microsoft JScript

Code

WPSC.Save (true, myResultFunction);

Requirements

Applies to: WPSC Object

See Also

Other Resources

Web Part Page Services Component (WPSC) Object Model