SPUrlUtility.IsProtocolAllowed method (String, Boolean)
Obtém um valor booleano que indica se a URL especificada usa um protocolo aceito.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaração
Public Shared Function IsProtocolAllowed ( _
fullOrRelativeUrl As String, _
allowRelativeUrl As Boolean _
) As Boolean
'Uso
Dim fullOrRelativeUrl As String
Dim allowRelativeUrl As Boolean
Dim returnValue As Boolean
returnValue = SPUrlUtility.IsProtocolAllowed(fullOrRelativeUrl, _
allowRelativeUrl)
public static bool IsProtocolAllowed(
string fullOrRelativeUrl,
bool allowRelativeUrl
)
Parâmetros
fullOrRelativeUrl
Type: System.StringUma seqüência de caracteres que contém o URL completo ou relativo.
allowRelativeUrl
Type: System.Booleantrue para permitir que uma URL relativa, como o parâmetro fullOrRelativeUrl ; Caso contrário, false.
Valor retornado
Type: System.Boolean
true se a URL usa um protocolo aceito; Caso contrário, false.
Comentários
Para retornar uma matriz de protocolos permitidos, use a propriedade AllowedProtocols .