Share via


AssetUrlSelector.AllowExternalUrls Property

A flag that determines whether the AssetUrl value is validated to ensure that it is in the current site collection.

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

Syntax

'Declaration
Public Property AllowExternalUrls As Boolean
    Get
    Set
'Usage
Dim instance As AssetUrlSelector
Dim value As Boolean

value = instance.AllowExternalUrls

instance.AllowExternalUrls = value
public bool AllowExternalUrls { get; set; }

Property Value

Type: System.Boolean
If set to true, the **AssetUrl()**value is validated to ensure that it is in the current site collection. The default value is false.

Remarks

The context of the current page request determines which site collection the AssetUrl is restricted to. Do not set this property to true if the AssetUrlTextBoxVisible or ValidateUrl properties are set to false.

Examples

        // These values control the appearance of the text box
        // and button for the control
        private const bool SampleAllowExternalUrls = false;

See Also

Reference

AssetUrlSelector Class

AssetUrlSelector Members

Microsoft.SharePoint.Publishing.WebControls Namespace

AssetUrlTextBoxVisible

ValidateUrl

AssetUrlSelector