获取一个布尔值,该值指示指定的 URL 使用受支持的协议。
命名空间: Microsoft.SharePoint.Utilities
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Shared Function IsProtocolAllowed ( _
fullOrRelativeUrl As String _
) As Boolean
用法
Dim fullOrRelativeUrl As String
Dim returnValue As Boolean
returnValue = SPUrlUtility.IsProtocolAllowed(fullOrRelativeUrl)
public static bool IsProtocolAllowed(
string fullOrRelativeUrl
)
参数
fullOrRelativeUrl
类型:System.String一个字符串,包含完全或相对 URL。
返回值
类型:System.Boolean
true如果 URL 使用受支持的协议 ;否则为false。
备注
若要返回的数组允许的协议,使用AllowedProtocols属性。