HttpUtility.HtmlEncode Method (String)
Encodes the specified string for use as text between HTML tags, or as an attribute value inside an HTML tag.
Namespace: Microsoft.SharePoint.Client.Utilities
Assembly: Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)
Syntax
'Declaration
Public Shared Function HtmlEncode ( _
valueToEncode As String _
) As String
'Usage
Dim valueToEncode As String
Dim returnValue As String
returnValue = HttpUtility.HtmlEncode(valueToEncode)
public static string HtmlEncode(
string valueToEncode
)
Parameters
valueToEncode
Type: System.StringA String representation of the data to encode.
Return Value
Type: System.String
A String representation of the encoded value.
Remarks
The HtmlEncode(String) method replaces the ampersand (&), double-quotation (“”), single-quotation (‘’), less-than (≤), and greater-than (≥) characters with the appropriate characters.