共用方式為


SPUrlUtility.IsProtocolAllowed method (String, Boolean)

取得布林值,指出指定的 URL 是否使用支援的通訊協定。

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

Syntax

'宣告
Public Shared Function IsProtocolAllowed ( _
    fullOrRelativeUrl As String, _
    allowRelativeUrl As Boolean _
) As Boolean
'用途
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
)

參數

  • fullOrRelativeUrl
    Type: System.String

    字串,包含完整或相對 URL。

  • allowRelativeUrl
    Type: System.Boolean

    若要允許做為fullOrRelativeUrl參數 ; 相對 URL 的true否則, false。

傳回值

Type: System.Boolean
true如果 URL 使用支援的通訊協定。否則, false。

備註

若要傳回的陣列允許的通訊協定,請使用AllowedProtocols屬性。

請參閱

參照

SPUrlUtility class

SPUrlUtility members

IsProtocolAllowed overload

Microsoft.SharePoint.Utilities namespace