SPEncode.UrlEncodeAsUrl method (String)
將編碼指定的字串,將特殊字元轉換為引號括住 utf-8 格式,但假設字串的 URL 路徑元件。
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Shared Function UrlEncodeAsUrl ( _
str As String _
) As String
'用途
Dim str As String
Dim returnValue As String
returnValue = SPEncode.UrlEncodeAsUrl(str)
public static string UrlEncodeAsUrl(
string str
)
參數
str
Type: System.String要編碼的 url 的字串。
傳回值
Type: System.String
編碼的字串。
備註
不同UrlEncode方法, UrlEncodeAsUrl方法不會編碼正斜線 ("/")。