SPUrlUtility.IsProtocolAllowed method (String)

Gets a Boolean value indicating whether the specified URL uses a supported protocol.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Function IsProtocolAllowed ( _
    fullOrRelativeUrl As String _
) As Boolean
'Usage
Dim fullOrRelativeUrl As String
Dim returnValue As Boolean

returnValue = SPUrlUtility.IsProtocolAllowed(fullOrRelativeUrl)
public static bool IsProtocolAllowed(
    string fullOrRelativeUrl
)

Parameters

  • fullOrRelativeUrl
    Type: System.String

    A string that contains the full or relative URL.

Return value

Type: System.Boolean
true if the URL uses a supported protocol; otherwise, false.

Remarks

To return an array of allowed protocols, use the AllowedProtocols property.

See also

Reference

SPUrlUtility class

SPUrlUtility members

IsProtocolAllowed overload

Microsoft.SharePoint.Utilities namespace