HttpUtility.HtmlEncode 方法 (String)
將編碼指定的字串,用於為 HTML 標籤之間的文字或 HTML 標籤內的屬性值。
命名空間: Microsoft.SharePoint.Client.Utilities
組件: Microsoft.SharePoint.Client (在 Microsoft.SharePoint.Client.dll 中)
語法
'宣告
Public Shared Function HtmlEncode ( _
valueToEncode As String _
) As String
'用途
Dim valueToEncode As String
Dim returnValue As String
returnValue = HttpUtility.HtmlEncode(valueToEncode)
public static string HtmlEncode(
string valueToEncode
)
參數
valueToEncode
類型:System.StringString方式呈現資料編碼。
傳回值
類型:System.String
編碼值的String表示。
備註
HtmlEncode(String)方法取代連字號 (&),點兩下引號 (「 」),單一關引號 ("),較少-比 (≤),和大於-比適當的字元 (≥) 字元。