共用方式為


SPHttpUtility.UrlPathEncode method (String, Boolean)

編碼指定的路徑的一部分進行 HTTP 傳輸的 URL。

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

Syntax

'宣告
Public Shared Function UrlPathEncode ( _
    urlToEncode As String, _
    allowHashParameter As Boolean _
) As String
'用途
Dim urlToEncode As String
Dim allowHashParameter As Boolean
Dim returnValue As String

returnValue = SPHttpUtility.UrlPathEncode(urlToEncode, _
    allowHashParameter)
public static string UrlPathEncode(
    string urlToEncode,
    bool allowHashParameter
)

參數

  • allowHashParameter
    Type: System.Boolean

    若要指定的解碼作業可以包含雜湊參數 ; true否則, false。

傳回值

Type: System.String
字串,包含已編碼的路徑。

請參閱

參照

SPHttpUtility class

SPHttpUtility members

UrlPathEncode overload

Microsoft.SharePoint.Utilities namespace