AssetUrlSelector.ValidateUrl property

Determines if the AssetUrl property value is validated to ensure that it is safe and valid.

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

Syntax

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

value = instance.ValidateUrl

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

Property value

Type: System.Boolean
True if the AssetUrl property value is validated to ensure that is is valid; otherwise; False.

Remarks

The validation checks to ensure that the URL has an allowed protocol or is a server-relative or internal anchor URL reference. It also uses the ValidateLinkValue() method to ensure that the URL is in a safe and acceptable format. If this property is set to false, you cannot use the AllowExternalUrls and IsUrlRequired properties. The ValidateUrl property should not be set to true if the AssetUrlTextBoxVisible property is set to false.

Examples

// These values control the appearance of the text box
// and button for the control.
private const bool SampleValidateUrl = true;
// Set values for the behavior and validation// for the text box.assetSelector.ValidateUrl = SampleValidateUrl;
' These values control the appearance of the text box
' and button for the control.
Private Const SampleValidateUrl As Boolean = True

' Set values for the behavior and validation
' for the text box.
assetSelector.ValidateUrl = SampleValidateUrl

See also

Reference

AssetUrlSelector class

AssetUrlSelector members

Microsoft.SharePoint.Publishing.WebControls namespace

ValidateLinkValue

AssetUrlSelector