SPHttpUtility.UrlPathEncode method (String, Boolean, Boolean, Boolean)
將編碼 Web 伺服器來自可靠的 HTTP 傳輸,用戶端的 URL 的路徑的部分。
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Shared Function UrlPathEncode ( _
urlToEncode As String, _
allowHashParameter As Boolean, _
encodeUnicodeCharacters As Boolean, _
rfcCompliant As Boolean _
) As String
'用途
Dim urlToEncode As String
Dim allowHashParameter As Boolean
Dim encodeUnicodeCharacters As Boolean
Dim rfcCompliant As Boolean
Dim returnValue As String
returnValue = SPHttpUtility.UrlPathEncode(urlToEncode, _
allowHashParameter, encodeUnicodeCharacters, _
rfcCompliant)
public static string UrlPathEncode(
string urlToEncode,
bool allowHashParameter,
bool encodeUnicodeCharacters,
bool rfcCompliant
)
參數
urlToEncode
Type: System.String要編碼的 URL。
allowHashParameter
Type: System.Booleantrue 以容許雜湊參數 ;否則,false。
- encodeUnicodeCharacters
Type: System.Boolean
rfcCompliant
Type: System.Boolean進行 URL 編碼與 RFC 3986 相容吗?請將它設定為除了傳統的程式碼相容性,則為 True。
傳回值
Type: System.String
編碼的 URL。如果 urlToEncode 參數是空的和空值如果 urlToEncode 參數為 null,空白。