获取一个布尔值,该值指示指定的 URL 使用受支持的协议。
命名空间: Microsoft.SharePoint.Utilities
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
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
类型:System.String一个字符串,包含完全或相对 URL。
allowRelativeUrl
类型:System.Booleantrue允许相对 URL 作为fullOrRelativeUrl参数 ;否则为false。
返回值
类型:System.Boolean
true如果 URL 使用受支持的协议 ;否则为false。
备注
若要返回的数组允许的协议,使用AllowedProtocols属性。