Share via


AssetUrlSelector.AssetUrl Property

Gets or sets the URL that the user has been typed or selected and enters it in the Asset URL text box.

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

Syntax

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

value = instance.AssetUrl

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

Property Value

Type: System.String
Defaults to an empty string.

Remarks

The AssetUrl value is validated or the URL decoded on postback if appropriate control properties are set. This property does not contain the selected URL on postback if the AssetUrlTextBoxVisible property is set to false.

Examples

       // This must be JavaScript returning a string
       // value for asset URL data.
        private const string ScriptGetAssetUrlValue = "window.location.href";

        // 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 
                };

See Also

Reference

AssetUrlSelector Class

AssetUrlSelector Members

Microsoft.SharePoint.Publishing.WebControls Namespace

ValidateUrl

DecodeUrlPath

AssetUrlSelector