HttpUtility.HtmlUrlAttributeEncode 方法 (String, TextWriter)
編碼,作為屬性值 URL 類型的屬性,例如錨點標記href屬性或src標記的屬性圖像,指定的字串,並將其附加至指定的輸出資料流。
命名空間: Microsoft.SharePoint.Client.Utilities
組件: Microsoft.SharePoint.Client (在 Microsoft.SharePoint.Client.dll 中)
語法
'宣告
Public Shared Sub HtmlUrlAttributeEncode ( _
urlAttributeToEncode As String, _
output As TextWriter _
)
'用途
Dim urlAttributeToEncode As String
Dim output As TextWriterHttpUtility.HtmlUrlAttributeEncode(urlAttributeToEncode, _
output)
public static void HtmlUrlAttributeEncode(
string urlAttributeToEncode,
TextWriter output
)
參數
urlAttributeToEncode
類型:System.String要編碼的字串。
output
類型:System.IO.TextWriterTextWriter物件輸出資料流要附加編碼的字串表示。
備註
HtmlUrlAttributeEncode(String)方法檢查 URL 通訊協定,如果 URL 是相對或允許的通訊協定,編碼的字串,用於做為屬性值。它不會編碼的路徑或查詢字串 URL。如果您要建立的 URL,來電UrlPathEncode和UrlKeyValueEncode分別前釐這個方法。