SPEncode.WriteUrlEncodeAsUrl method
編碼指定的字串,並將它寫入 HTTP 輸出內容資料流轉換至特殊字元以引號括住 utf-8 格式,但假設字串路徑元件的通用資源定位器 (URL)。
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Shared Sub WriteUrlEncodeAsUrl ( _
response As HttpResponse, _
str As String _
)
'用途
Dim response As HttpResponse
Dim str As StringSPEncode.WriteUrlEncodeAsUrl(response, _
str)
public static void WriteUrlEncodeAsUrl(
HttpResponse response,
string str
)
參數
response
Type: System.Web.HttpResponse目前 HTTP 要求 System.HttpResponse 物件。
str
Type: System.String要編碼的 url 的字串。
備註
不同WriteUrlEncode方法, UrlEncodeAsUrl方法不會編碼正斜線 ("/")。