Share via


AssetUrlSelector.AssetUrlChanged Event

Event that occurs when the Asset Picker dialog box returns a value and AutoPostBack is set to true.

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

Syntax

'Declaration
Public Event AssetUrlChanged As EventHandler
'Usage
Dim instance As AssetUrlSelector
Dim handler As EventHandler

AddHandler instance.AssetUrlChanged, handler
public event EventHandler AssetUrlChanged

Remarks

This event only occurs when the AutoPostBack property is set to true and the Asset Picker dialog box is launched and returns a value or when AssetUrlTextBoxVisible is set to true and the text box contents change during postback.

Examples

            // Sets an event handler for when the AssetUrl value changes on a postback.
            assetSelector.AssetUrlChanged += 
                delegate(object sender, System.EventArgs ev)
                { 
                    string newAssetUrlValue = ((AssetUrlSelector)sender).AssetUrl;

                    // Perform event handling operations based on the newAssetUrlValue. 
                };

            // Add the configured assetSelector to the controls on the page.
            containerControl.Controls.Add(assetSelector);
        }

See Also

Reference

AssetUrlSelector Class

AssetUrlSelector Members

Microsoft.SharePoint.Publishing.WebControls Namespace

AutoPostBack

AssetUrlSelector