AssetUrlClientID property

AssetUrlSelector.AssetUrlClientID property

Gets or sets the client identifier (ID) used to find the HTML element for the URL value returned from the Asset Picker dialog box.

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

public string AssetUrlClientID { get; set; }

Property value

Type: System.String
Defaults to the client ID of the Asset URL text box control.

If this property is set, the AssetUrl property does not contain the value selected in the dialog box. After a value is returned in the dialog box, the application uses the AssetUrlClientID property to retrieve an HTML element with a specified ID from the HTML document.

If an HTML element with the specified ID is found, its "value" property is set to the returned URL from the Asset Picker dialog box.

If the HTML element found is an input field and is visible, the returned value from the dialog box appears in the control and the URL value can be retrieved from that control's posted values. The ClientCallback property can be used to perform further ECMAScript (JavaScript, JScript) operations after the URL value is captured in the HTML element.

    // Uses text box client ID to connect the Asset// Picker to the text boxes for the resulting// URL and default text values returned from the// Asset Picker dialog box.assetSelector.AssetUrlClientID = assetUrlControl.ClientID;assetSelector.AssetTextClientID = assetTextControl.ClientID;

© 2016 Microsoft