AssetUrlSelector.ClientCallback Property

Gets or sets a client JavaScript string that specifies a function to call when the Asset Picker dialog box returns a value.

Namespace:  Microsoft.SharePoint.Publishing.WebControls
Assembly:  Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)

Syntax

'Declaration
Public Property ClientCallback As String
    Get
    Set
'Usage
Dim instance As AssetUrlSelector
Dim value As String

value = instance.ClientCallback

instance.ClientCallback = value
public string ClientCallback { get; set; }

Property Value

Type: System.String
Defaults to an empty string.

Remarks

If this property is set to a value, the value is emitted into the registered client JavaScript for this control and the application uses the client value of this JavaScript to specify the callback function for the Asset Picker dialog box. This client callback function is called after the Asset Picker dialog box returns a value and the returned URL and default text are stored in any HTML elements specified by AssetUrlClientID and AssetTextClientID properties. This ClientCallback property is called whether the Asset Picker dialog box is launched from an Asset Picker button or from JavaScript retrieved by the GetClientLaunchPickerReference method If the AutoPostBack property is set to true,then the AutoPostBack happens after the call to the ClientCallback function is complete.

The string for this property can be the name of an appropriate JavaScript function available in the page, a global variable with an appropriate function reference stored in it, or an explicitly defined anonymous JavaScript function string such as the following:

"function(newAssetUrl, newAssetText, configObject, returnValue)
{
//Perform client side script operations with the new asset URL value
}."

Examples

            // Set the JavaScript to perform after populating the text boxes with the returned values
            assetSelector.ClientCallback = ScriptClientCallback;

See Also

Reference

AssetUrlSelector Class

AssetUrlSelector Members

Microsoft.SharePoint.Publishing.WebControls Namespace

AssetUrlSelector